🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5797

Re: Is this Pascal?

#5797
From: Martin_Fox
Date: Wed, 05 Oct 1988 22:33
33 lines
1488 bytes
Looks like Modula-2 to me.  Tip-offs include the use of the CARDINAL type,
which is used for unsigned integers, the lack of BEGIN's, and the inclusion
of the procedure name at the end of the declaration.

Modula-2 is a nifty language defined by Wirth to clean up some of the problems
of Pascal, providing clearer syntax, low level facilities, type coercion, etc.
I suggest you find a copy of Wirth's book on the language (I cannot remember
who publishes it).  It is very similar to Pascal, just a step up.  However,
Modula programs cannot be compiled with Pascal compilers, due to syntax
differences.

Groups of statements do not, in general, need to be bracketed in Modula, as
every control structure assumes a list of statements follows.  In other words,
the syntax for a FOR loop is

	FOR variable := start TO stop DO
		statement1 ;
		statement2 ;
		etc. ;
	END (* FOR *) ;

For an IF statement, the syntax is

	IF expression THEN
		statement1 ;
		statement2 ;
		etc. ;
	ELSE
		statement ;
		statement ;
	END (* IF *) ;

The code you showed looked badly formatted and improperly indented.
Technical Details
Message-ID: <460001@hpbsla.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!ucbvax!hplabs!hp-sde!hpcea!hpbsla!mfox
References: <942@naucse.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!pasteur!ucbvax!hplabs!hp-sde!hpcea!hpbsla!mfox
From: mfox@hpbsla.HP.COM (Martin_Fox)
Newsgroups: comp.lang.misc
Subject: Re: Is this Pascal?
Message-ID: <460001@hpbsla.HP.COM>
Date: 5 Oct 88 22:33:41 GMT
References: <942@naucse.UUCP>
Organization: Hewlett-Packard Boise R & D Lab
Lines: 33