Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many Predefined Identifiers are WRONG, which dialect is this supposed to be??? #17

Open
trijezdci opened this issue Jun 16, 2023 · 0 comments

Comments

@trijezdci
Copy link

https://github.com/harogaston/Sublime-Modula-2/blob/9bd5077f925ac7a3edc87d45d1f872593ff7377e/Modula-2.tmLanguage#LL69C22-L69C22

The list of predefined identifiers appears to be a mish-mash of different compilers and their dialects, but it is neither a complete list of all the identifiers in use in all the dialects nor does it represent a single dialect.

The designer should first have decided which dialect or dialects to support.

There are three important ones:

  • PIM : Classic Modula-2 as defined by Prof. Niklaus Wirth in his book "Programming in Modula-2.
  • ISO : The ISO Modula-2 standard.
  • R10 : A modern revision of PIM.

Each of these have different sets of reserved words and predefined identifiers.

PIM's list of predefined identifiers is:

NIL, TRUE, FALSE, BOOLEAN, CHAR, CARDINAL, INTEGER, LONGIN, REAL, LONGREAL,
ABS, CAP, CHR, FLOAT, HIGH, MAX, MIN, ODD, ORD, SIZE, TRUNC, VAL, DEC, EXCL, HALT, INC, INCL;

source Niklaus Wirth, Programming in Modula-2, 4th Edition, Springer Verlag.

R10's list of predefined identifiers is:

NIL, TRUE, FALSE, BOOLEAN, OCTET, CHAR, UNICHAR, CARDINAL, LONGCARD, INTEGER, LONGINT,
REAL, LONGREAL, APPEND, INSERT, REMOVE, CHR, UCHR, COLLATION, ORD, ODD, ABS, SGN, MIN,
MAX, LOG2, POW2, ENTIER, PRED, SUCC, PTR, CAPACITY, COUNT, LENGTH, FIRST, LAST, PREV,
NEXT, TMIN, TMAX, TSIZE, TLIMIT;

source https://github.com/m2sf/m2bsk/wiki/Language-Specification-(9)-:-Predefined-Identifiers

The ISO Modula-2 standard is available for a 400 USD fee from any national standardisation body. Due to the exorbitant cost, I didn't obtain any copy, but I can assure that it doesn't match with the list in the sublime source file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant