home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d512 / m2pascal.lha / M2Pascal / src / OutModule.def < prev    next >
Text File  |  1991-07-20  |  2KB  |  61 lines

  1. DEFINITION MODULE OutModule;
  2.  
  3.  (* 
  4.     This module is used as a "go-between" between the processing part of the
  5.     the program and the file part of the program. 
  6.     It keeps track of columns outputed for word wrap which goes into effect 
  7.     if the object line is a lot longer than the source line and won't fit.
  8.     Setting the debug option will print the data that is being sent to the
  9.     actual external file to the screen.
  10.  *)
  11.  
  12. FROM scan    IMPORT IndentArray, STRING;
  13.  
  14.  
  15.  
  16. PROCEDURE output ( indent   : IndentArray ;    
  17.                    word     : STRING );
  18.  
  19.  
  20.  (* If there are blanks in the InFile that we are about to read
  21.     then this procedure will tack the blanks on to the back of
  22.     of the symbol automatically. If the next character is not a blank
  23.     then no blanks are added on to the symbol string
  24.  *)
  25. PROCEDURE AddBlanks ( VAR symbol : STRING       ) ;
  26.  
  27.  
  28. PROCEDURE identical ( s1, s1 : STRING  ) : BOOLEAN;
  29.  
  30.  
  31.  (* Read first options of a one or two option command like so:
  32.               INC ( i , 1 )   OR  INC ( i )
  33.                    ^^^                 ^^^      -> returned value
  34.                        |                  |     -> ptr to next char.
  35.  
  36.                   The comma is read and thrown out in the first case.
  37.  *)
  38. PROCEDURE FirstOption  ( VAR  symbol : STRING );
  39.  
  40.  
  41.  
  42.  (* Use to get retrieve a second option of a two option command. 
  43.     This is used after a call to FirstOption(). 
  44.     Here is a picture :
  45.              INC ( i , 1 ) ;   OR   INC ( i ) ;
  46.                       |                     |     -> start on entry
  47.                           |                  |    -> finish on exit
  48.  *)
  49. PROCEDURE SecondOption ( VAR  symbol : STRING);
  50.  
  51.  
  52.  (* Put the string "begin" in the output file either on the same line
  53.     we've been using or on the next line according to the default 
  54.     parameters.
  55.  *)
  56. PROCEDURE PutBEGIN  ( indent  : IndentArray  );
  57.  
  58. PROCEDURE WriteIndent ( indent  : IndentArray );
  59.  
  60. END OutModule.
  61.