AND
Logical AND
This string function returns the logical AND, bit-by-bit, of two string expressions of equal length.
Syntax
Section titled “Syntax”AND (string-value1, string-value2 [,ERR=line-ref|,ERC=error-code])string-value1,2- are any strings of equal length.
line-ref- is the program line number or label to branch to if an error is produced by this function.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”If string-value1 and string-value2 do not contain the same number of characters, an ERR=17 results.
Examples
Section titled “Examples”AND ("ABCdef",$DFDFDFDFDFDF$)returns the string “ABCDEF”, converting all lowercase characters to uppercase.
AND (A$, DIM (LEN (A$), $7F$))returns a string with the upper bit in each byte cleared; this is necessary in converting some 8-bit ASCII code to 7-bit ASCII characters.
See also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF