ProvideX V8.20 > Language Reference > 3. System Functions
458
IOR( ) Function
       Logical OR
Format
IOR(value1[$],value2[$][,ERR=stmtref])
Where:
stmtref
Program line number or label to transfer control to.
value1[$]
Compared values. String or numeric expressions/variables. If strings,
value2[$]
value1$ must be the same length as value2$
Returns
Result of logical 'OR' comparison of two expressions/variables.
Description
The IOR( ) function performs a bit-wise logical 'OR' comparison of two string or
numeric expressions/variables, and generates a value as a result. The length of the
two string expressions must be equal or ProvideX returns an Error #46: Length
of string invalid.
Binary
Result
0 IOR 0
0
1 IOR 0
1
0 IOR 1
1
1 IOR 1
1
Therefore
yields
IOR($41$,$42$)
Hex 43 01000011
yields
IOR($41$,$25$)
Hex 65 01100101
yields
IOR($5A$,$DD$)
Hex DF 11011111
See Also
XOR( ) Exclusive OR Comparison, p.552
AND( ) Logical AND, p.392
Example
0040 READ (1,END=1000)F$
0050 R$=IOR(F$(1,2),$8080$) ! Turn on high bit
0060 ...