home *** CD-ROM | disk | FTP | other *** search
- module hello3 (opsmain)
- {
-
- --
- -- writesym() and writechar() are routines which are written in C to be
- -- called from OPS. writesym() writes out a symbol. writechar() writes
- -- out a character.
- --
- external procedure writesym(&X : out symbol);
- external procedure writechar(&C : out char);
-
-
- --
- -- getname() is called by the C routines to convert a symbol into
- -- an array of characters. It is necessary because C routines cannot
- -- directly print out symbols.
- --
- procedure getname(&N : out name, &X : symbol)
- {
- call name(&N, &X);
- };
-
-
- --
- -- opsmain() is the entry point for the program; It is the first
- -- procedure to execute when the program is started.
- --
- procedure opsmain()
- {
- call writesym(|Hello world|);
- call writechar('\n');
- };
-
- };