----boundary-LibPST-iamunique-2088771559_-_-
Content-type: text/plain
> -----Original Message-----
> From: René A. Krywult [mailto:rene.krywult{([at]})nowhere.xy> Sent: Friday, 1 October 2004 4:38 PM
> To: CFB Software
> Subject: RE: clear or fill memory? & Semicolon question
>
> Another question: IN the style guide we are told not to write
> a semi-colon, if not necessary.
>
> For example:
>
> IF a = b THEN
> Do1;
> Do2;
> Do3
> END;
>
> I've been thinking about this for a while now, and I think
> this is really questionable for 2 reasons:
>
> 1) Following the KSS-rule (Keep it simple and stupid), it is
> more simple to always write statements the same way, if that
> is possible. It IS possible to write the semicolon after Do3,
> there is no different behavior involved, and if you have to
> think of omitting the semicolon, this affords additional
> (unnecessary) thought when writing code.
>
> 2) If you decide to add a Do4 in the above, right before the
> END, you have to insert a semicolon after the Do3 (which is a
> line that you would not need to touch at all!!) and then
> enter the Do4. So every time you write a new line, you have
> to look if there already is a semicolon (which is bad code
> according to the style guide) or if there is none.
>
> So why is this recommended? I think it is as useless as were
> the excessive BEGINs and ENDs in ancient Pascal.
>
I agree with you but I am not overly concerned about it. I use Gerard
Meunier and Helmut Zinns excellent CPC-Beautifier which sensibly allows
you a choice.
However, from a purely technical viewpoint, the last semicolon is
definitely superfluous. Also, it is much less of an issue if you use
Wirth's coding style - include as many components of a compound
statement as possible on the one line:
IF a = b THEN
Do1; Do2; Do3
END;
I believe that I got into the habit of writing one statement per line,
out of necessity, when using systems with interactive debuggers.
However, I have recently begun to see some advantages of having multiple
statements per line.
This topic does not seem to be explicitly addressed in the style guide,
and both variants are used in the OmS source code.
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-2088771559_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCA+IC0tLS0tT3JpZ2luYWwgTWVz
c2FnZS0tLS0tXHBhcg0KPiBGcm9tOiBSZW5cJ2U5IEEuIEtyeXd1bHQgW21haWx0bzpyZW5lLmty
eXd1bHRAYW9uLmF0XVxwYXINCj4gU2VudDogRnJpZGF5LCAxIE9jdG9iZXIgMjAwNCA0OjM4IFBN
XHBhcg0KPiBUbzogQ0ZCIFNvZnR3YXJlXHBhcg0KPiBTdWJqZWN0OiBSRTogY2xlYXIgb3IgZmls
bCBtZW1vcnk/ICYgU2VtaWNvbG9uIHF1ZXN0aW9uXHBhcg0KPiBccGFyDQo+IEFub3RoZXIgcXVl
c3Rpb246IElOIHRoZSBzdHlsZSBndWlkZSB3ZSBhcmUgdG9sZCBub3QgdG8gd3JpdGVccGFyDQo+
IGEgc2VtaS1jb2xvbiwgaWYgbm90IG5lY2Vzc2FyeS5ccGFyDQo+IFxwYXINCj4gRm9yIGV4YW1w
bGU6XHBhcg0KPiBccGFyDQo+IElGIGEgPSBiIFRIRU5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