home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / ALGOL / ALGOL_M.ZIP / ALGOLM.HLP < prev    next >
Encoding:
Text File  |  1987-01-11  |  12.3 KB  |  237 lines

  1. Invoking the ALGOL/M Compiler and Run-Time System
  2. ALGOL/M Reserved Words
  3. ALGOL-M LANGUAGE DESCRIPTION
  4. ALGOL-M LANGUAGE DESCRIPTION -- Type Declarations
  5. ALGOL-M LANGUAGE DESCRIPTION -- Arithmetic Processing
  6. ALGOL-M LANGUAGE DESCRIPTION -- Control Structures
  7. ALGOL-M LANGUAGE DESCRIPTION -- Input/Output
  8. ALGOL-M LANGUAGE DESCRIPTION -- Disk Access
  9. ALGOL-M Compiler Error Messages
  10. ALGOL-M Run-Time Error and Warning Messages
  11. :Invoking the ALGOL/M Compiler and Run-Time System
  12.  
  13.      ALGOL/M is invoked by typing --
  14.  
  15.           ALGOLM filename $option
  16.  
  17. wherσ 'filenameº i≤ thσ namσ oµ thσ filσ 'filename.ALGº whicΦ contain≤ ì
  18. thσá sourcσá oµá thσ ALGOL/═ program«á  Upoε executinτá thi≤á command¼ ì
  19. ALGOL/═á wil∞á compilσ thi≤ sourcσ prograφ int∩ thσ pseud∩á codσá filσ ì
  20. 'filename.AIN' which can then be executed by typing --
  21.  
  22.           RUNALG filename
  23.  
  24. wherσ 'filenameº i≤ thσ namσ oµ thσ filσ 'filename.INTº whicΦ contain≤ ì
  25. the ALGOL/M pseudo code.
  26.  
  27.      The options recognized by the ALGOL/M Compiler are --
  28.  
  29.           $A        Generate a listing at the terminal
  30.           $E        Set Trace Mode for execution under RUNALG
  31.           $AE       Do Both of the above
  32. :ALGOL/M Reserved Words
  33.  
  34.     AND        ARRAY        BEGIN        CASE
  35.     CLOSE        DECIMAL        DO        ELSE
  36.     END        FILE        FUNCTION    GO
  37.     GOTO        IF        INTEGER        NOT
  38.     OF        ONENDFILE    OR        PROCEDURE
  39.     READ        STEP        STRING        TAB
  40.     THEN        TO        UNTIL        WHILE
  41.     WRITE        WRITEON
  42. :ALGOL-M LANGUAGE DESCRIPTION
  43.  
  44.                  Although ALGOL-M was modeled after ALGOL-60, no  attempt
  45.              was  made  to make it a formal subset of ALGOL-60.  This was
  46.              done intentionally in order  to  provide  a  language  which
  47.              would   be   best   suited  to  the  needs  of  applications
  48.              programmers using microcomputer systems.  However, the basic
  49.              structure  of ALGOL-M is similar enough to ALGOL-60 to allow
  50.              simple conversion of  programs  from  one  language  to  the
  51.              other.   This  was considered particularly important in view
  52.              of the  fact  that  the  standard  publication  language  is
  53.              ALGOL-60.    Therefore,  there  exists  a  large  source  of
  54.              applications programs and library procedures  which  can  be
  55.              simply converted to execute under ALGOL-M.è:ALGOL-M LANGUAGE DESCRIPTION -- Type Declarations
  56.  
  57.                      ALGOL-M supports three types of variables: integers,
  58.              decimals,   and  strings.  Integers may be any value between
  59.              -16,383 and +16,383.  Decimals may be declared with up to 18
  60.              digits  of  precision and strings may be declared as long as
  61.              255 characters.  The default precision for decimals  is  ten
  62.              digits and the default length for strings is ten characters.
  63.              Decimal and string variable lengths may be integer variables
  64.              which can be assigned actual values at run-time.
  65.                      Another form of declaration in ALGOL-M is the  array
  66.              declaration.  Arrays may  have up  to  255  dimensions  with
  67.              each dimension ranging from       0 to +16,383.  The maximum
  68.              8080  microprocesor  address  space  of  63k  bytes   limits
  69.              practical   array   sizes  to  something  smaller  than  the
  70.              maximum.  Dimension bounds may be integer variables with the
  71.              actual  values  assigned at run-time.  Arrays may be of type
  72.              integer, decimal or string.
  73. :ALGOL-M LANGUAGE DESCRIPTION -- Arithmetic Processing
  74.  
  75.                      Integer and  binary  coded  decimal  arithmetic  are
  76.              supported  under  ALGOL-M.   Integers may be used in decimal
  77.              expressions and will be converted to decimals  at  run-time.
  78.              The  integer  and  decimal  comparisons  of  less-than  (<),
  79.              greater-than (>), equal-to  (=),  not-equal-to  (<>),  less-
  80.              than-or-equal-to (<=), and greater-than-or-equal-to (>=) are
  81.              provided.  Additionally, the logical operators AND,  OR  and
  82.              NOT are available.
  83. :ALGOL-M LANGUAGE DESCRIPTION -- Control Structures
  84.  
  85.                      ALGOL-M control structures consist  of  BEGIN,  END,
  86.              FOR, IF THEN, IF THEN ELSE, WHILE, CASE and GOTO constructs.
  87.              Function and  procedure  calls  are  also  used  as  control
  88.              structures.   ALGOL-M  is  a block stuctured language with a
  89.              block normally bracketed by a BEGIN and an END.  Blocks  may
  90.              be  nested  within  other  blocks to nine levels.  Variables
  91.              which are declared within a block  can  only  be  referenced
  92.              within that block or a block nested within that block.  Once
  93.              program control proceeds outside  of  a  block  in  which  a
  94.              variable   has  been  declared,  the  variable  may  not  be
  95.              referenced and, in fact, run-time  storage  space  for  that
  96.              variable no longer exists.
  97.  
  98.                      Functions, when called, return an  integer,  decimal
  99.              or  string  value  depending  on  the  type of the function.
  100.              Procedures  do  not  return  a  value  when  called.    Both
  101.              functions  and  procedures  may have zero or more parameters
  102.              which are call by value and both may be called recursively.
  103. :ALGOL-M LANGUAGE DESCRIPTION -- Input/Output
  104.  
  105.                      The ALGOL-M WRITE statement  causes  output  to  the
  106.              console on a new line.  The desired output is specified in a
  107.              write  list  which  is  enclosed  in  parentheses.    String
  108.              constants  may be used in a write list and are characterized
  109.              by being enclosed in quotation marks.   Any  combination  ofè             integer,  decimal  and  string  variables or expressions may
  110.              also be used in a write list.  A WRITEON statement  is  also
  111.              available  which  is  essentially  the  same  as  the  WRITE
  112.              statement except that output continues on the same  line  as
  113.              the output from a previous WRITE or WRITEON statement.  When
  114.              a total of 80 characters have been written to the console, a
  115.              new line is started automatically.  A TAB option may also be
  116.              used in the write list which causes the  following  item  in
  117.              the  write  list  to  be  spaced  to the right by a specifed
  118.              amount.
  119.  
  120.                     Console input is accomplished by the READ  statement
  121.              followed  by  a  read  list  of  any combination of integer,
  122.              decimal and string variables enclosed  in  parentheses.   If
  123.              embedded  blanks  are  desired  in  the  input  for a string
  124.              variable, the console input must be  enclosed  in  quotation
  125.              marks.   A  READ  statement will result in a halt in program
  126.              execution at run-time until the input values  are  typed  at
  127.              the  console  and  a carriage return is sent.  If the values
  128.              typed at the console match the read list in number and type,
  129.              program  execution  continues.   If an error as to number or
  130.              type of variables from the console occurs, program execution
  131.              is again halted until values are re-entered on the console.
  132. :ALGOL-M LANGUAGE DESCRIPTION -- Disk Access
  133.  
  134.                      ALGOL-M programs may read data from,  or write  data
  135.              to,   one  or more disk files which may be located on one or
  136.              more disk drives.  When file input  or  output  is  desired,
  137.              the  appropriate  READ  or  WRITE  statement  is modified by
  138.              placing a filename  identifier  immediately  after  READ  or
  139.              WRITE.   The  actual name of the file may be assigned to the
  140.              file name identifier when the program is written or  it  may
  141.              be assigned at run-time.  Various disk drives are referenced
  142.              by the letters  A  through  Z.   A  specific  drive  may  be
  143.              specified by prefixing the actual file name with the desired
  144.              drive letter followed by a colon.  Additionally,  if  random
  145.              file  access  is  desired,  the  file name identifier may be
  146.              followed by a comma and an integer constant or variable.
  147.              This integer value specifies the record within the file which 
  148.              is to be used for input/output.
  149.  
  150.  
  151.                      Prior to the use of a file name identifier in a READ
  152.              or  WRITE statement, the file name identifier must appear in
  153.              a file declaration statement.  The file name identifier  can
  154.              only be referenced within the same block (or a lower  block)
  155.              as  the  file  declaration.   Files  are normally treated as
  156.              unblocked sequential files.  However, if blocked  files  are
  157.              desired,  the  record  length may optionally be specified in
  158.              brackets after the  file  name  identifier  in  the  file
  159.              declaration statement.
  160. :ALGOL-M Compiler Error Messages
  161.  
  162. AS      Function/Procedure on left hand side of assignment
  163.         statement.
  164. BP      Incorrect bound pair subtype (must be integer).
  165. DE      Disk error; no corrective action can be taken  
  166.         in the program.
  167. DD      Doubly declared identifier, label, variable etc.
  168. FP      Incorrect file open statement.
  169. IC      Invalid special character.
  170. ID      Subtypes incompatible (decimal values can not be
  171.         assigned to integer variables).
  172. IO      Integer overflow.
  173. IT      Identifier is not declared as a simple variable or
  174.         function.
  175. NG      No ALG file found.
  176. NI      Subtype is not integer.
  177. NP      No applicable production exists.
  178. NS      Subtype is not string.
  179. NT      For clause,Step expression,Until clause expressions are not
  180.         of the same subtype.(must all be integer or decimal).
  181.  
  182. PC      Number of parameters in procedure call does not match the 
  183.         number in the procedure declaration.
  184. PD      Undeclared parameter.
  185. PM      Parameter type does not match the declared type.
  186. SO      Stack overflow.
  187. SI      Array subscript is not of subtype integer.
  188. TD      Subtype has to be integer or decimal.
  189. TM      Subtypes do not match or are incompatible.
  190. TO      Symbol table overflow.
  191. TS      Undeclared subscripted variable.
  192. UD      Undeclared identifier.
  193. UF      Undeclared file/function.
  194. UL      Undeclared label.
  195. UP      Undeclared procedure.
  196. US      Undeclared simple variable.
  197. VO      Varc table overflow.  Possibly caused by too many 
  198.         long identifiers.
  199. :ALGOL-M Run-Time Error and Warning Messages
  200.  
  201.           ERROR Messages
  202.  
  203. AB      Array subscript out of bounds.
  204. CE      Disk file close error.
  205. DB      Input field length is larger then the buffer size.
  206. DW      Disk file write error.
  207. ER      Variable block size write error.
  208. IO      Integer overflow(integer value greater than 16383).
  209. IR      Record number incorrect or random file is not initialized.
  210. ME      Disk file creation error.
  211. NA      No AIN file found on directory.
  212. OV      Decimal register overflow during arithmetic operation/
  213.         load.
  214. RE      Attempt to read past end of record on blocked file.
  215. RU      Attempt to random access a non-blocked file.
  216. SK      Stack overflow(no more memory available).
  217.  
  218.            WARNING Messages
  219.  
  220. AZ      Attempt to allocate null decimal or string,
  221.         system defaults to 10 digits/characters.
  222. DO      Decimal overflow during store operation. The value of
  223.         the variable is set to 1.0 and execution continues.
  224.         The variable's allocation size should be increased in
  225.         it's declaration statement.
  226. DI      Disk file variable format error.
  227. DZ      Decimal division by zero, result is set to 1.0.
  228. EF      End of file on read.
  229. IA      Integer addition/subtraction over/under flow 
  230.         result is set to 1.
  231. II      Invalid Console Input. Try input again.
  232. IR      Record number incorrect or random file is not initialized.
  233. IZ      Integer division by zero. Divisor set to 1 and 
  234.         division is completed.
  235. NX      Negative exponential. Exponentiation not done.
  236. SO      Characters lost during string store.
  237.