IMP: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
(Created page with "The IMP logical operator converts the result of two comparative values and returns a bit result. {{PageSyntax}} : {{Parameter|result}} = {{Parameter|firstValue}} IMP {{Parameter|secondValue}} {{PageDescription}} * Returns a different result from AND, OR or XOR - see truth table below. * Evaluates if {{Parameter|firstValue}} '''''imp'''lies'' {{Parameter|secondValue}}. **If {{Parameter|firstValue}} is true then {{Parameter|secondValue}} must also...")
 
No edit summary
Line 13: Line 13:




{{Template:LogicalTruthTable}}
{{LogicalTruthTable}}





Revision as of 12:43, 5 June 2022

The IMP logical operator converts the result of two comparative values and returns a bit result.


Syntax

result = firstValue IMP secondValue


Description

  • Returns a different result from AND, OR or XOR - see truth table below.
  • Evaluates if firstValue implies secondValue.
    • If firstValue is true then secondValue must also be true.
    • So if firstValue is true, and secondValue false, then the condition is false, otherwise it is true (see table below).


Template:LogicalTruthTable


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link