Download AI198 Version 2.2x User`s Guide

Transcript
AI198 Version 2.2x System Manager/User’s Guide
Reading Alias Macros: Parts of a Macro
Table C-3 Operators in Order of Precedence (First to Last) (Continued)
Operator
Function
&
Boolean logical AND (both necessary to be true)
^
Boolean logical exclusive OR (one or the other acceptable to be
true, not both)
|
Boolean logical OR (either acceptable to be true)
Functions
Functions are preset, and they convert strings and numbers. Several macro functions
have two names for the same function: the word and a one letter initial. For example,
s and switch represent the same macro function. The following table lists the
functions and their descriptions in alphabetical order.
Table C-4 Alias Macro Functions
Alias Macro Function
Description of Operation
asc$(string)
Returns the integer value of the first character in the
string.
chr$(n)
Returns a string holding the character whose ASCII
value is n.
hex$(n)
Returns n converted into a hexadecimal integer value.
Example: =hex$(13) returns the hexadecimal integer
value D
or
h(n)
if(expression,a,b)
or
Returns item a if expression is not zero or b if expression
is zero.
i(expression,a,b)
left$(string,n)
or
Returns left most n characters of the string. (Returns the
entire string if n is greater than the length of the string.)
l(string,n)
len(string)
or
Returns the length of the string.
Example: =n(bob) returns the integer 3
n(string)
mid$(string,x,n)
or
m(string,x,n)
Returns n characters from the string starting with the xth
character. (Returns a null string if x is greater than the
length of the string. Returns to end of the string if fewer
than n characters follow character x.)
C-7