- This wiki is out of date, use the continuation of this wiki instead
 
TRUE
From FenixWiki
(Difference between revisions)
												
			
			| Revision as of 17:26, 2 May 2007 (edit) Sandman (Talk | contribs) m (True moved to TRUE) ← Previous diff  | 
				Revision as of 11:02, 7 July 2007 (edit) (undo) Sandman (Talk | contribs) (→Example) Next diff →  | 
			||
| Line 11: | Line 11: | ||
| Begin | Begin | ||
| + | // comparison with the constant TRUE | ||
| if(b == true) | if(b == true) | ||
| - |         say("b was  | + | say("b was TRUE! so b==1"); | 
| else | else | ||
| - |         say("b was not  | + | say("b was not TRUE! so b!=1"); | 
| + | end | ||
| + | |||
| + | // checking the integer itself | ||
| + | if(b) | ||
| + | say("b was true! so b!=0"); | ||
| + | else | ||
| + | say("b was not true! so b==0"); | ||
| end | end | ||
Revision as of 11:02, 7 July 2007
Definition
INT true
True is a constant integer, equal to the value 1. It is used to state that something is true and not false.
Example
Program example;
Private
    int b = true;
Begin
    // comparison with the constant TRUE
    if(b == true)
        say("b was TRUE! so b==1");
    else
        say("b was not TRUE! so b!=1");
    end
    // checking the integer itself
    if(b)
        say("b was true! so b!=0");
    else
        say("b was not true! so b==0");
    end
    Loop
        frame;
    End
End
						
			
		