
7 RASExpress Script Language
CommPlete Communications Server 161
RASExpress Script Commands
This section lists the RASExpress script commands in alphabetical order. Note that
these commands are a subset of the MultiExpress script language, from which the ex-
amples were taken. Therefore, some of the examples contain commands that are not
available in the RASExpress script command set, notably the conditional commands.
Nonetheless, we hope that the following examples will illustrate the use of the
RASExpress script commands.
ATOF atof(string number_string) : real;
Converts number_string into a floating point number.
Example
/*This script illustrates the atof command.*/
proc main;
real x;
string s;
s = "12345.67";
x = atof(s);
fdisplay("Number string is ‘%s’, float value is : %f^J^M", s, x);
endproc
ATOI atoi(string number) : integer;;
Converts a numeric string of digits to an integer. If a non-decimal character is en-
countered in the string, the return value is undefined.
Example
/*This script illustrates the atoi command.*/
proc main;
string str;
display("Example for atoi command^J^M");
display("Enter a numeric string to convert to integer : ");
getstr(str, 10);
fdisplay("^J^MDecimal value of ‘%s’ is : %d ", str, atoi(str));
endproc
Komentarze do niniejszej Instrukcji