The following variables are built in to E and are called system variables. They are global so can be accessed from any procedure.
fredand you ran it like this:
thenfred file.txt "a big file" another
argwould the string:
If you have AmigaDOS 2.0 (or greater) you can use the system routinefile.txt "a big file" another
ReadArgsto parse the command line in a much more versatile way. There is a worked example on argument parsing in Part Three (see 21 Argument Parsing).
NILif your program was started from the Shell/CLI, otherwise it's a pointer to the Workbench message which contains information about the icons selected when you started the program from Workbench. So, if you started the program from Workbench
wbmessagewill not be
NILand it will contain the Workbench arguments, but if you started the program from the Shell/CLI
NILand the argments will be in
ReadArgs). There is a worked example on argument parsing in Part Three (see 21 Argument Parsing).
stdoutvariables contain the standard input and output filehandles. If your program was started from the Shell/CLI they will be filehandles on the Shell/CLI window (and
NIL). However, if your program was started from Workbench these will both be
NIL, and in this case the first call to
WriteFwill open an output `CON:' window and store the file handle for the window in
conout. The file handle stored in
conoutwill be closed using
Closewhen the program terminates, so you can set up your own `CON:' window or file for use by the output functions and have it automatically closed. See 11.3.1 Input and output functions.
Plot. This can be changed so that these functions draw on different screens etc. See 11.3.3 Graphics functions.
Go to the Next or Previous section, the Detailed Contents, or the Amiga E Encyclopedia.