Imp

From NSB App Studio
Revision as of 13:20, 5 July 2012 by Brendon (talk | contribs) (Created page with "''Reslut'' = ''x'' IMP ''y'' '''Description''' IMP returns the logical implication of two expressions. Logical implication returns TRUE if ''x'' implies ''y''. IMP also does...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Reslut = x IMP y

Description

IMP returns the logical implication of two expressions. Logical implication returns TRUE if x implies y. IMP also does a bitwise comparison of two numeric expressions.

Table 13: Logical Implication

x y Implication
True/1 True/1 True/1
True/1 False/0 False/0
False/0 True/1 True/1
False/0 False/0 True/1

Example

REM IMP Example
'IMP preforms logical and bitwiseimplication
DIM Test1, Test2, Test3, x, y
x = 3
y = 5
Test1 = x < 0 IMP y < 10
Test2 = x > 0 IMP y > 10
Test3 = x < 0 IMP y > 10
PRINT "Logical:"
PRINT "  x < 0 IMP y < 10 = " & Test1
PRINT "  x > 0 IMP y > 10 = " & Test2
PRINT "  x < 0 IMP y > 10 = " & Test3

Output

Logical:
  x < 0 IMP y < 10 = True
  x > 0 IMP y > 10 = False
  x < 0 IMP y > 10 = True

Related Items

AND, EQV, NOT, OR, XOR