Re: [BLACKBOX] Still kicking the BlackBox tires. A question for the group about annoyances.

From: [at]} <Bob>
Date: Sat, 10 Mar 2012 16:56:08 -0000

----boundary-LibPST-iamunique-196150922_-_-
Content-type: text/plain

> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Sometimes I write code like
>
> k := 0
> WHILE k <= kMax DO
> Process (k);
> INC (k)
> END;
>
> Sometimes, however, I forget the INC and get caught in an infinite
> loop, [...]
>
> But I don't have a solution (maybe I was asleep and missed a good
> one?).

I have long been in the habit of always writing the INC (or Read, or
whatever in some other language) before writing anything else in the body of
the loop. Once bitten, twice shy.

I was taught to program in COBOL using the Jackson Structured Programming
method and I made a point of writing the control structures and reads before
I wrote any of the body of the code so that I could be sure of reading the
files successfully, which made it much easier to debug because I wasn't
getting my brain tangled up in all the other stuff.

Bob


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-196150922_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gRnJvbTogQmxhY2tCb3ggW21haWx0bzpCTEFD
S0JPWEBMSVNUUy5PQkVST04uQ0hdIE9uIEJlaGFsZiBPZiBSb2JlcnRccGFyDQo+IFNvbWV0aW1l
cyBJIHdyaXRlIGNvZGUgbGlr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hZGUgaXQgbXVjaCBlYXNpZXIgdG8gZGVidWcgYmVjYXVzZSBJIHdhc24ndFxwYXINCmdl
dHRpbmcgbXkgYnJhaW4gdGFuZ2xlZCB1cCBpbiBhbGwgdGhlIG90aGVyIHN0dWZmLlxwYXINClxw
YXINCkJvYlxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBh
IG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5P
QkVST04uQ0h9fQA4US1u
----boundary-LibPST-iamunique-196150922_-_---
Received on Sat Mar 10 2012 - 17:56:08 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:07 UTC