Skip to content

AND

Logical AND

This string function returns the logical AND, bit-by-bit, of two string expressions of equal length.

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.

If string-value1 and string-value2 do not contain the same number of characters, an ERR=17 results.

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.

IOR, NOT, and XOR functions

From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF