Functions:
ABS() Function - Absolute Value
Syntax
ABS(num{,ERR=lineref})
Description
The ABS() function returns the absolute value of its numeric argument.
Parameter Description
num Numeric argument.
ERR=lineref Branch to be taken if an error occurs during execution.
Example
>PRINT ABS(123) 123 >PRINT ABS(0) 0 >PRINT ABS(-123) 123
CVS() Function - String Data Conversion
Syntax
CVS(string,int{,ERR=lineref})
Description
The CVS() function modifies a given string by the value of int from the table below:
Parameter Description
string String to be converted.
int Integer identifying conversion functions, according to the following table.
ERR=lineref Branch to be taken if an error occurs during execution.
Values for int Parameter
Value Description
0 Do nothing.
1 Strip leading spaces.
2 Strip trailing spaces.
4 Convert characters to uppercase.
8 Convert characters to lowercase.
16 Convert nonprintable characters to spaces.
32 Replace multiple spaces with a single space.
64 Replace "," and "." characters with values as specified in OPTS (see SETOPTS).
A combination of operations may be specified by adding functional values. For example, CVS(A$,5) strips leading spaces and converts to upper case. CVS(A$,5) is equivalent to CVS(A$,1+4), which is equivalent to CVS(CVS(A$,1),4). When multiple operations are combined in a single CVS() function, they are guaranteed to be applied in ascending numeric order. For example, CVS(A$,1+16+32) first strips leading spaces, then converts non-printable characters to spaces, and finally replaces multiple spaces with a single space. To apply multiple options in a different order, execute the CVS() in a nested manner as shown in the above example.
Examples
0010 LET A$=CVS(" 123",1)
0020 PRINT A$
123

New Topic/Question
Reply




MultiQuote






|