home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / turbo_part1.lha / modula / m2 / CliArgs.def < prev    next >
Encoding:
Modula Definition  |  1994-12-23  |  600 b   |  20 lines

  1. DEFINITION MODULE CliArgs ;
  2.  
  3. (* If your prgram will only run under 2.0+ amigas then you may like to use *)
  4. (* Dos.ReadArgs instead.                           *)
  5.  
  6. VAR
  7.   truncated : BOOLEAN ;
  8.  
  9. PROCEDURE GetArgCount( ) : LONGINT ;
  10. (* Returns the number of arguments specified on the command line *)
  11. (* eg 'm2c x.mod' would return 2                 *)
  12.  
  13. PROCEDURE GetArg( n : LONGINT ; VAR arg : ARRAY OF CHAR ) ;
  14. (* If n > GetArgCount-1 then the program aborts execution      *)
  15. (* Arg 0 = program name.                          *)
  16. (* If the argument does not fit in the array then it is truncated *)
  17. (* and truncated := TRUE                      *)
  18.  
  19. END CliArgs.
  20.