Fully Bracketed Syntax
Neel Krishnaswami
neelk at brick.cswv.com
Sun Feb 13 11:41:26 EST 2000
Carel Fellinger <cfelling at iae.nl> wrote:
> Neel Krishnaswami <neelk at brick.cswv.com> wrote:
>
> > Dylan uses this style, but Modula-2 uses the Pascal BEGIN/END style.
>
> It has been a long time since I used Modula-2, but if memory serves me
> right... and indeed according to my copy of the 3e edition of Wirth's
> "Progr. in Modula-2" it sure does (okee, it uses END instead of ENDIF:)
I just double-checked, and see that you are right and I was wrong. I
just grabbed a listing of some Modula-2 code, and looked at it for
BEGIN...END pairs; and when I saw them used in procedure declarations,
I stopped looking at the rest of the code. Bad Neel. :)
Here's a sample for people who wonder what I'm talking about:
PROCEDURE UnifyArgs(list1, list2: TypeList);
BEGIN
IF (list1 = Empty) AND (list2 = Empty) THEN
RETURN;
END;
IF (list1 = Empty) OR (list2 = Empty) THEN
ErrorMod.Msg("Type clash");
ELSE
UnifyType(list1^.head, list2^.head);
UnifyType(list1^.tail, list2^.tail);
END;
END UnifyArgs;
Neel
More information about the Python-list
mailing list