home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / dev / amiga_e-2.1b.lha / Amiga_E-2.1b / Sources / Examples / WbArg.e < prev   
Encoding:
Text File  |  1993-10-05  |  443 b   |  16 lines

  1. /* reading the arguments when started from wb.
  2.    give this program a .info file, and shift-select some icons with it. */
  3.  
  4. MODULE 'workbench/startup'
  5.  
  6. PROC main()
  7.   DEF wb:PTR TO wbstartup, args:PTR TO wbarg, a
  8.   IF wbmessage=NIL                /* we got from cli */
  9.     WriteF('args = "\s"\n',arg)
  10.   ELSE                        /* from wb */
  11.     wb:=wbmessage
  12.     args:=wb.arglist
  13.     FOR a:=1 TO wb.numargs DO WriteF('wbarg #\d = "\s"\n',a,args[].name++)
  14.   ENDIF
  15. ENDPROC
  16.