TRUE: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
| Line 3: | Line 3: | ||
|type=integer | |type=integer | ||
|value=1 | |value=1 | ||
|desc=Constant used to define the TRUE value in conditional structures or variables/constants in general. Usually it's used | |desc=Constant used to define the TRUE value in conditional structures or variables/constants in general. Usually it's used because it is more readable, indicating a [[Boolean|boolean]] value instead a [[Integer|integer]] value (1). | ||
|examples=<lsl>integer q; | |examples=<lsl>integer q; | ||
Revision as of 11:22, 4 January 2012
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Caveats
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>