Modula-2 (Hamburg VAX-11 Modula-2 V3.2) for OpenVMS VAX 7.3 -- examples and tests, 12-OCT-2026
=============================================================================================

Douglas P. Fields, Jr. (symbolics@lisp.engineer)

Eight programs with a DCL test. The same files are installed with the kit
in SYS$COMMON:[SYSLIB.MODULA2.EXAMPLES]; this archive is for reading them
without installing, or for taking them to a machine on which you will
install the kit later.

Send every file as TEXT (FTP "ascii"). Put them all in one directory on the
VAX (a flat directory: the test procedure finds the programs and the
expected output beside itself), then, as an ordinary user:

  $ @SYS$COMMON:[SYSLIB.MODULA2]MODULA2_SETUP
  $ @RUN_TESTS

RUN_TESTS builds each program in a scratch directory ([.M2TEST] under your
login directory, or the directory you name as its first parameter), runs it
with the input file shown, and compares the output with the expected
file. It ends "PASS 8 of 8". The expected files were written by independent
Python code (examples/make_expected.py), not by running the VAX programs.

examples/
  README.md       What each program shows and the VAX/VMS features it uses,
                  with sample output.
  HELLO.MOD       The first program.
  VMSINFO.MOD, VMSX.DEF
                  Process and node information from $GETJPIW, $GETSYIW,
                  $ASCTIM, through a foreign definition module of its own;
                  compared by the test with F$GETJPI and F$GETSYI.
  PHONEBK.MOD     A telephone book in an RMS indexed file (XABKEY): keyed
                  get, put, update, delete, sequential list, "key greater
                  or equal" search; PHONEBK_IN.TXT and PHONEBK_IN2.TXT are
                  the two runs, the second finds what the first left.
  LIFE.MOD        Conway's life on a 30 by 14 torus.
  SIEVE.MOD       The sieve of Eratosthenes as a pipeline of coroutines
                  (NEWPROCESS, TRANSFER).
  FLOATS.MOD      F, D, G and H floating point side by side.
  CALC.MOD, TOKENS.DEF, TOKENS.MOD
                  A recursive descent calculator with separate compilation.
  BADPROG.MOD     Deliberately wrong: the compiler must reject it.
  *_IN*.TXT, *_EXP.TXT, FLOATS_CHECK.TXT
                  Inputs, expected output, and the leading digits FLOATS
                  must print.
  RUN_TESTS.COM   The test procedure.
  make_expected.py
                  Host-side Python 3 that computes the expected files.

Names in the files: VSIM4 is a simulated MicroVAX 3900 and USER1 an
ordinary account; they appear in sample output only.
