Chapter 7
RAPID!
Functions
314
4460 GSM System Option and 4468 EDGE System Option
Version 12.20
TIME$
Functions for error
handling
For program-internal error handling, the following functions have been imple-
mented in RAPID!
ERR
Description
Calls a command of the operating system, specified in
parameter$
.
parameter$
may contain all legal commands of the
operating system including the pipe (‘>’) symbol. Thus,
output generated by a command of the operating system
may be routed to a file and read in by a RAPID! program.
If
parameter$
does not contain a valid command of
the operating system, a runtime error will occur.
Examples
The following one-line program reads the file list of all
files contained in a specified directory and stores them in
a text file.
SHELL "ls /usr/new > /usr/new/ls.txt"
Syntax
TIME$
Parameters
There are no parameters.
Description
Returns a string containing the system time in the fol-
lowing format: "hh:mm:ss", where "hh" is a positive inte-
ger, giving the current system hour (in 24 h format),
"mm" give the current minutes and "ss" represent the
current seconds.
Examples
TIME$
would have returned "10:29:37" at the time this
table was created.
Function
Short description
ERR
Returns the error code of the most recent error.
ERL
Gives the program line, in which the last error occurred.
ERF$
Returns the name of program file, in which the last error
occurred.
Syntax
ERR
Parameters
There are no parameters.
Description
Returns the error code of the latest error that occurred.
For the meaning of the error codes, please see
for reference.