
RASExpress User Guide
162 CommPlete Communications Server
BAUDRATE baudrate(integer baud_rate | string baud_rate) : integer;;
Sets the baud rate to the specified value. If a connection is not initialized or an invalid
baud rate is specified, the command is ignored and 0 is returned; otherwise the baud
rate is initialized and 1 is returned.
Example
/*This script illustrates the baudrate command.*/
proc main;
display("Testing baud rate setting^J^M");
display("Baud rate will be set to 2400, press any key...");
getkey;
baudrate(2400);
display("^J^MBaud rate will be set to 19200, press any key...");
getkey;
baudrate(19200);
display("^J^MData bits will be set to 7, press any key...");
getkey;
databits(7);
display("^J^MData bits will be set to 8, press any key...");
getkey;
databits(8);
display("^J^MStop bits will be set to 1, press any key...");
getkey;
stopbits(1);
display("^J^MStop bits will be set to 2, press any key...");
getkey;
stopbits(2);
display("^J^MParity will be set to even, press any key...");
getkey;
parity("even");
display("^J^MParity will be set to none, press any key...");
getkey;
parity("none");
endproc
CEIL ceil(real float_no) : integer;;
Rounds up float_no to the next greatest integer (if the value is already an integer, its
value is returned). For example, 1023.23 is returned as 1024; -1023.23 is returned as
-1023.
Example
/*This script illustrates the ceil command.*/
proc main;
real x;
x = 1023.23;
fdisplay("ceil(%f) is : %d^J^M", x, ceil(x));
x = -1023.23;
fdisplay("ceil(%f) is : %d^J^M", x, ceil(x));
endproc
Comentarios a estos manuales