
RASExpress User Guide
174 CommPlete Communications Server
ITOA itoa(integer number, var string buffer [, integer radix]);
Converts number to a sequence of characters according to radix and copies it to buffer.
If radix is not given, 10 (decimal) is assumed. If number is converted and buffer is up-
dated, 1 is returned; otherwise 0 is returned.
Example
/* This script illustrates the itoa command. */
proc main;
integer i;
string str;
display("Example for itoa command^J^M");
display("Enter an integer (in decimal) : ");
i = getint;
itoa(i, str);
fdisplay("^J^MValue in decimal is : %s^J^M", str);
itoa(i, str, 16);
fdisplay("Value in hex is : %s^J^M", str);
endproc
MKDIR mkdir(string) : integer;
Creates the directory in the path specified by path_name. If creation of the directory is
successful, 1 is returned; else 0 is returned.
Example
/* This script illustrates the mkdir command. */
proc main;
string name;
integer len;
len = 45;
display("Example for mkdir command^J^M");
display("Enter directory name to create : ");
if getstr(name, len) then
if mkdir(name) then
fdisplay("^J^M%s created^J^M", name);
else
fdisplay("^J^M%s could not be created^J^M", name);
endif
endif
endproc
MOD mod(integer number1, number2) : integer;
Divides number1 by number2 and returns the remainder. If number2 is zero, script exe-
cution is terminated.
Example
See dec command.
Comentários a estes Manuais