Difference between revisions of "FALSE"

From Second Life Wiki
Jump to: navigation, search
(there was nothing here! now there is.)
Line 3: Line 3:
 
|type=integer
 
|type=integer
 
|value=0
 
|value=0
|desc
+
|desc=Constant used to define the FALSE value in conditional structures or variables/constants in general. Usually it's used to become it more readable, indicating a [[Boolean|boolean]] value instead a [[Integer|integer]] value (0).
 
|examples=<lsl>integer q;
 
|examples=<lsl>integer q;
  

Revision as of 07:26, 2 January 2012

Description

Constant: integer FALSE = 0;

The integer constant FALSE has the value 0

Constant used to define the FALSE value in conditional structures or variables/constants in general. Usually it's used to become it more readable, indicating a boolean value instead a integer value (0).

Related Articles

Constants

•  TRUE

Articles

•  boolean

Examples

<lsl>integer q;

default {

   state_entry()
   {
       q = TRUE;
       if(q)
       {
           llSay(0, "TRUE");
           q = FALSE;
           if(!q)
           {
               llSay(0, "FALSE");
               q = TRUE;
               if(!q)
               {
                   llSay(0, "Won't say this");
               }
               else
               {
                   llSay(0, "TRUE");
                   q = FALSE;
                   if(q)
                   {
                       llSay(0, "Won't say this");
                   }
                   else
                   {
                       llSay(0, "FALSE");
                   }
               }
           }
           else
           {
               llSay(0, "Won't say this");
           }
       }
       else
       {
           llSay(0, "Won't say this");
       }
   }

}</lsl>

Deep Notes

Search JIRA for related Issues

Signature

integer FALSE = 0;