home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e050 / 1.ddi / HELLO3.OPS < prev    next >
Encoding:
Text File  |  1986-08-19  |  794 b   |  34 lines

  1. module hello3 (opsmain)
  2. {
  3.  
  4. --
  5. -- writesym() and writechar() are routines which are written in C to be
  6. -- called from OPS.  writesym() writes out a symbol.  writechar() writes
  7. -- out a character.
  8. --
  9. external procedure writesym(&X : out symbol);
  10. external procedure writechar(&C : out char);
  11.  
  12.  
  13. --
  14. -- getname() is called by the C routines to convert a symbol into
  15. -- an array of characters.  It is necessary because C routines cannot
  16. -- directly print out symbols.
  17. --
  18. procedure getname(&N : out name, &X : symbol)
  19.   {
  20.     call name(&N, &X);
  21.   };
  22.  
  23.  
  24. --
  25. -- opsmain() is the entry point for the program;  It is the first
  26. -- procedure to execute when the program is started.
  27. --
  28. procedure opsmain()
  29.   {
  30.     call writesym(|Hello world|);
  31.     call writechar('\n');
  32.   };
  33.  
  34. };