Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VAXTPU BOOLEAN_EXPRESSIONS — VMS 5.2

 BOOLEAN EXPRESSIONS


 In VAXTPU, all odd integers can be used to represent the Boolean value
 TRUE, and all even integers can be used to represent the Boolean value
 FALSE.

 VAXTPU evaluates Boolean expressions by performing logical operations on
 the operands one bit at a time.  For example, if VAXTPU encounters the
 expression 7 AND 9, it performs four AND operations, evaluating each bit
 of 7 with the corresponding bit of 9, as follows:

     0     1     1    1
    AND   AND   AND   AND
     1     0     0    1
    ---------------------
     0     0     0     1

 In this example, the four bits produced by the four AND operations
 evaluate to 1.  Since odd values are TRUE, the result of 7 and 9 could be
 used to represent the Boolean value TRUE.

 When executing a Boolean expression, VAXTPU evaluates expressions enclosed
 in parentheses before other elements.  When using multiple operators
 (logical or otherwise) in one expression, you should use parentheses to
 ensure that the compiler evaluates expressions in the order you intend.
 For example, the following IF clause shows how to parenthesize an
 expression containing both logical and relational operators:

    IF (x = 12) AND (y <> 40)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026