Before the port is opened, AMOS Professional opens the "rexxsyslib.library" file from the libs: folder, which should be installed on your hard disc. The selected port is then checked for possible problems, and if it is already opened, an error will be generated and the program aborted.
AREXX CLOSE
instruction: close a communications port
Arexx Close
Use this command to close an open AREXX communications port. If a message has been received via the port, but is waiting for a response, a "Message not answered" error will be generated. If you then leave the AMOS Professional program without responding, the port will be closed with an error code of 20, which is fatal! Please see below, for a further explanation of these error code values
.
AREXX EXIST
function: check availability of a communications port
value=Arexx Exist("PORT_NAME")
This function checks for the presence of the named communications port in the Amiga's
memory.
A value of -1 (True) means that it is available, whereas zero (False) indicates that there is a
problem.
AREXX EXIST can also be used to check if the AREXX system has been installed. Whenever AREXX is activated, it opens up two communications ports "AREXX" and "REXX", so the following example can be used for a test:
E> If Arexx Exist("REXX")=0 Trap Exec "RexxMast" : Rem Load AREXX and trap an error If Arexx Exist ("REXX")=0 Print "Sorry, AREXX cannot be opened!" Endif Endif
AREXX WAIT
instruction: wait for a message from an AREXX program
Arexx Wait
This command halts an AMOS Professional program until a message arrives from an AREXX program. This operation can be aborted at any time as usual, by pressing [Ctrl]+[C] to return to the AMOS Professional Editor.
AREXX
function: check for a message from an AREXX program
status=Arexx
The AREXX function performs a GET MESSAGE command from the Amiga's operating system.