Multitech MT5634HD16 Guía de usuario Pagina 161

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 292
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 160
7 RASExpress Script Language
CommPlete Communications Server 151
Arguments
Arguments focus the execution of a command in some way. They can be passed from
one process to another by value or by address. If you have one or two values you
wish to pass, it is probably more efficient to pass the value. Following is an example
of a statement that passes the value of variable t to process test.
test (t);
To pass an argument by address, prefix the argument name in the formal parameter
list by the keyword VAR.
test (VAR t);
You might want to use this method if you have an array of values stored in sequential
addresses. Once you have passed the address of the first value, you can increment the
address to retrieve the other values.
Variables are the only arguments that can be passed by address. However, an expres-
sion like
A + B, where A and B are integer variables, can be passed by value.
Variables
Three basic types of variables are supported: INTEGER, REAL, and STRING. Since
the ASCII null character is internally used to indicate the end of the sequence, it can-
not be part of STRING. All other characters, including extended ASCII characters, can
be part of STRING.
Format String and Format Control Characters
The format string contains two types of objects: ordinary characters that are copied to
the output stream as is (with one exception as explained below), and format conver-
sion specifications, each of which leads to the conversion of the corresponding argu-
ment and is copied to the output stream.
The character \ is given special treatment:
If the following character is \, it is copied to the output stream.
If the following character is n, a newline is copied to the output stream.
If the following character is r, a carriage return is copied to the output stream.
If the following character is x or X, the next two characters are taken and treated as
hexadecimal and copied to the output stream.
Any other character forces the \ as well as the following character to be copied to
the output stream.
Conversion specification begins with the % character and is followed by the conver-
sion character. The conversion characters and their meanings are:
d The argument is converted to a decimal notation.
x The argument is converted to a hexadecimal notation.
f The argument is converted to a floating point notation.
s The argument is a string; characters from the string are copied until a null is
encountered.
Vista de pagina 160
1 2 ... 156 157 158 159 160 161 162 163 164 165 166 ... 291 292

Comentarios a estos manuales

Sin comentarios