
7 RASExpress Script Language
CommPlete Communications Server 169
FINDNEXT findnext(var string file_name) : integer;
If there is a matching next file/directory for the given pattern, file_name is updated;
otherwise it is not updated. If there is a next file/directory the return value is 1, else it
is 0.
Example
See findfirst command.
FLOOR floor(real float_no) : integer;
Rounds down float_no to the next integer (if the value is already an integer, its value
is returned). For example, 1023.23 is returned as 1023; -1023.23 is returned as -1024.
Example
/* This script illustrates the floor command. */
proc main;
real x;
x = 1023.23;
fdisplay("floor(%f) is : %d^J^M", x, floor(x));
x = -1023.23;
fdisplay("floor(%f) is : %d^J^M", x, floor(x));
endproc
FOPEN fopen(string file_name [, string open_mode | integer open_mode]) : integer;
Opens file_name. The mode in which the file should be opened is specified by
open_mode. If open_mode is not specified, it is assumed to be read/write mode. If a
string argument is given for open_mode, it should be either readonly or readwrite; any
other value will fail the command. If open_mode is an integer, it should match the val-
ues accepted in the DOS Int 21 Fn 3Dh. (I.e., the value should be a valid open mode as
understood by DOS. If the value is not a valid one, it could lead to unpredictable be-
havior). If the file is opened, the predefined variable EOF is set and the file handle is
returned; otherwise -1 is returned.
Example
See fcreate command.
FPUTC fputc(integer file_handle, string buffer) : integer;
Writes the first character from the buffer to the file given by the file_handle. Returns the
number of bytes written to the file. If an invalid file handle is passed the command is
ignored and 0 is returned.
Example
See fcreate command.
Komentáře k této Příručce