Download MD VersaForm User Manual - CompuMed Consulting Online!

Transcript
256
VersaForm XL
If the item PART# has space for 5 characters on the form, SIZE has a value
of 5.
STR (ex1, ex2, ex3) Function.
Returns a sub-string of EX1 where EX2 is the starting position and EX3 is
the maximum length of the result. If EX2 or EX3 are zero or negative or
EX2 is out of bounds, the result is an empty string. EX3 may indicate a
length that is greater than the length of EX1. In that case only the remaining
portion of EX1 is returned.
Example:
If the value of EX1 is 'ABCDEFGHIJ' then
STR (EX1, 1, 3) {returns the value 'ABC'}
STR (EX1, 8, 5) {returns the value 'HIJ'}
STR (EX1, 12, 3) {returns the value ''}
If you wish to always have a result be a specific length (say 10 characters) in
cases where the input value may be longer or shorter, combine the STR and
PAD (or RPAD) functions as follows:
PAD (STR (EX1, 1, 10), 10);
If EX1 is longer than 10 characters STR will truncate it; if shorter, PAD will
extend it.
SYSTEM_COLOR (ex-system color number) Function.
Returns the value of the system color attribute corresponding to the given
system color number, as set by the currently effective user or system setup.
The system color numbers are:
1:
2:
3.
4.
5:
6:
Menus attribute
Menu hilite attribute
Menu bold attribute
Information box attribute
Error box attribute
Zoom attribute
If any other argument is given, the function returns 0.
Example: get the current menu hilite attribute.
attrib := system_color (2);
TEST (Flag) Function.
Returns a value, (TRUE if Flag is ON, or FALSE of Flag is OFF) depending
on test result. All flags that can be set using SET/CLEAR/POP procedures
can be tested using this function.