Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> true predefined boolean value pp 42</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TRUE                      Predefined Boolean Value                    pp 42


 Define:  Predefined Boolean value of one.

 Purpose: Provide a means a testing a condition.

 Notes:   False < True is always satisfied by defining False as zero
          and True as 1.

          True occupies one byte of memory.


 ----------------------------------------------------------------------------


 Usage:
       VAR
          No  : Boolean     ;
          Yes : Boolean     ;

       BEGIN
          Yes := 2 < 3      ;       { Set Yes to True      }
          No  := 3 < 2      ;       { Set No to False      }
          WriteLn (Ord(No));;       { '0' is displayed     }
          WriteLn (No)      ;       { 'FALSE' is displayed }
          WriteLn (Ord(Yes));       { '1' is displayed     }
          WriteLn (Yes)     ;       { 'TRUE' is displayed  }
       END.

See Also: False

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson