[net.lang.mod2] Changes to Modula-2

devine@asgb.UUCP (Robert J. Devine) (05/03/85)

  The Jan/Feb issue of the Journal of Pascal, Ada,& Modula-2 has a
4 page article by Niklaus Wirth on changes to Modula-2.  The article
is too long to post, so I will briefly list some of the changes.

---- Restrictions and Clarifications ----
1. Formal VAR and actual parameters must be identical.
2. Expressions for the start and end values in a FOR statement must
   be compatible.
3. A process initiated at priority N can't call a procedure declared
   in a module at priority M < N.
4. Pointer types can be exported from def modules as opaque types.
5. All modules imported to the main module are initialized before
   the importing module is initialized.

---- Changes ----
1. All objects declated in a def module are exported. The explicit
   export list is discarded.
2. The syntax of a varient record type is changed to always include a ':'.
3. The parameters of the procedure TRANSFER are of type ADDRESS.

---- Changes ----
1. The syntax of the case statement and the empty variant is changed
   to allow empty bars similar to empty statements (i.e. multiple ';'s).
2. A string consisting of N chars is said to have length N. A string of
   length 1 is assignment compatiblel with the type CHAR.
3. The syntax of the subrange type is changed to allow one to specify
   the base type of a subrange.
4. Elements of sets can now be constant expressions (not just constants).
5. The symbol ~ is synonymous with NOT.
6. LONGCARD, LONGINT, and LONGREAL are now standard types.
7. The type ADDRESS is compatible with all pointer types and either
   CARDINAL or LONGCARD (depending on machine).
8. The standard functions take any scalar types as arguments (include
   REAL).


  Wirth's article includes the entire grammar for Modula-2 with these
changes.

Bob Devine

tower@inmet.UUCP (05/10/85)

Re:
> ***** inmet:net.lang.mod2 / asgb!devine /  7:50 pm  May 85, 19783
>
>  The Jan/Feb issue of the Journal of Pascal, Ada,& Modula-2 has a
> 4 page article by Niklaus Wirth on changes to Modula-2.

This article also appeared in Issue #0 (Oct. 84) of Modula-2 News, for
those looking for the full text.

-len tower	    UUCP:     {bellcore,ihnp4}!inmet!tower
 Intermetrics, Inc. INTERNET: ima!inmet!tower@CCA-UNIX.ARPA
		    USPS:     733 Concord Ave., Cambridge, MA  02138, USA
		    PHONE:    (617) 661-1840