(unknown charset) Semi-colon question

From: (unknown charset) John Stout <"John>
Date: Fri, 1 Oct 2004 21:25:03 +0100

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

When teaching Pascal we always found the students had problems with:

        IF ... THEN
                S1;
        ELSE
                S2;
        S3

since they found it hard to see why you needed the ; after S2 but it caused
problems after S1. Obviously with Modula/Oberon/Component Pascal this
problem has vanished, and the associated problem of teaching the BEGIN/END
compound statement has also gone, but I still find that I automatically
write:

        IF ... THEN
                S1;
                S2
        ELSE
                S3;
                S4
        END;
        S6

Yes, it's awkward having to go back and put the ; in if you want to add an
S5, but most of the editors I've used require that you either start at the
S4 and press Enter to get the alignment right or press TABs to get S5
aligned correctly so I never find it that much of a problem.

I teach it as a matter of style, but emphasise it is a matter of style, a
bit like not writing:

        IF aBoolean = TRUE THEN
        END

John Stout



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.768 / Virus Database: 515 - Release Date: 22/09/2004
 
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xyTo 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.xyCurrent 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-1359279134_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0M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