Difference between revisions of "Template:LSL Conditional"
Jump to navigation
Jump to search
m (accident) |
m (I'm trashing that template, because it makes no sense to keep it around.) |
||
Line 70: | Line 70: | ||
}} | }} | ||
</div> | </div> | ||
</noinclude><includeonly>{{#vardefine:pe_name|{{{statement_end|}}}}}{{#vardefine:pe_desc|{{#var:p_{{#var:pe_name}}_desc}}{{{statement_end_desc|}}}}}{{#vardefine:p1_name|{{{p1_name|}}}}}{{#vardefine:p1_type|{{{p1_type|}}}}}{{#vardefine:p_{{#var:p1_name}}_desc|{{#var:p_{{#var:p1_name}}_desc}}{{{p1_desc|}}}}}{{#vardefine:p2_name|{{{p2_name|}}}}}{{#vardefine:p2_type|{{{p2_type|}}}}}{{#vardefine:p_{{#var:p2_name}}_desc|{{#var:p_{{#var:p2_name}}_desc}}{{{p2_desc|}}}}}{{#vardefine:p3_name|{{{p3_name|}}}}}{{#vardefine:p3_type|{{{p3_type|}}}}}{{#vardefine:p_{{#var:p3_name}}_desc|{{#var:p_{{#var:p3_name}}_desc}}{{{p3_desc|}}}}}{{#vardefine:p4_name|{{{p4_name|}}}}}{{#vardefine:p4_type|{{{p4_type|}}}}}{{#vardefine:p_{{#var:p4_name}}_desc|{{#var:p_{{#var:p4_name}}_desc}}{{{p4_desc|}}}}}{{#vardefine:p5_name|{{{p5_name|}}}}}{{#vardefine:p5_type|{{{p5_type|}}}}}{{#vardefine:p_{{#var:p5_name}}_desc|{{#var:p_{{#var:p5_name}}_desc}}{{{p5_desc|}}}}}{{#vardefine:p6_name|{{{p6_name|}}}}}{{#vardefine:p6_type|{{{p6_type|}}}}}{{#vardefine:p_{{#var:p6_name}}_desc|{{#var:p_{{#var:p6_name}}_desc}}{{{p6_desc|}}}}}{{#vardefine:p7_name|{{{p7_name|}}}}}{{#vardefine:p7_type|{{{p7_type|}}}}}{{#vardefine:p_{{#var:p7_name}}_desc|{{#var:p_{{#var:p7_name}}_desc}}{{{p7_desc|}}}}}{{#vardefine:p8_name|{{{p8_name|}}}}}{{#vardefine:p8_type|{{{p8_type|}}}}}{{#vardefine:p_{{#var:p8_name}}_desc|{{#var:p_{{#var:p8_name}}_desc}}{{{p8_desc|}}}}}{{#vardefine:p9_name|{{{p9_name|}}}}}{{#vardefine:p9_type|{{{p9_type|}}}}}{{#vardefine:p_{{#var:p9_name}}_desc|{{#var:p_{{#var:p9_name}}_desc}}{{{p9_desc|}}}}}{{#vardefine:p10_name|{{{p10_name|}}}}}{{#vardefine:p10_type|{{{p10_type|}}}}}{{#vardefine:p_{{#var:p10_name}}_desc|{{#var:p_{{#var:p10_name}}_desc}}{{{p10_desc|}}}}}{{#vardefine:p11_name|{{{p11_name|}}}}}{{#vardefine:p11_type|{{{p11_type|}}}}}{{#vardefine:p_{{#var:p11_name}}_desc|{{#var:p_{{#var:p11_name}}_desc}}{{{p11_desc|}}}}}{{#vardefine:p12_name|{{{p12_name|}}}}}{{#vardefine:p12_type|{{{p12_type|}}}}}{{#vardefine:p_{{#var:p12_name}}_desc|{{#var:p_{{#var:p12_name}}_desc}}{{{p12_desc|}}}}}{{#vardefine:return_end| {{#if:{{#var:pe_desc}}|{{HoverText|{{#var:pe_name}}|{{#var:pe_desc}}}}|{{#var:pe_name}}}}}}{{#vardefine:name|{{{statement}}}}}{{#vardefine:type|flow control}}{{#vardefine:template|none}}{{#ifeq:{{#var:mode}}|god|{{{{#ifeq:{{#var:mode}}|god|LSL_Generic/god|!}}|}} }}{{#ifeq:{{#var:mode}}|request|{{{{#ifeq:{{#var:mode}}|request|LSL_Generic/request|!}}|}} }}{{#if:{{{deprecated|}}}{{{depreciated|}}}|{{{{#if:{{{deprecated|}}}{{{depreciated|}}}|LSL_Generic/deprecated|!}}|{{{deprecated|}}}{{{depreciated|}}}|}}}}{{#vardefine:mode|{{#var:mode}}{{{mode|}}}}}{{#vardefine:self|{{#var:self}}{{{self|}}}}}{{#vardefine:sort|{{#if:{{#var:sort}}|{{#var:sort}}|{{#if:{{{sort|}}}|{{{sort}}}|{{ucfirst:{{#var:name}}}}}}}}}}{{#vardefine:header_footnote|{{{statement_desc|}}}}}{{#vardefine:header_desc|{{{statement_type|}}}}}{{#vardefine:separator|<nowiki>;</nowiki>}}{{#vardefine:header_text|{{LSL_Generic/Text}}}}{{#vardefine:header_title|{{#if:{{{statement_title|}}}|{{{statement_title|}}}|{{LSL_Generic/Title}}}}}}{{#ifeq:{{NAMESPACE}}|Template|<div></div>|<div id="RealTitleBanner" style="display:none;"><span id="RealTitle">{{#var:name}}</span></div>}} __NOTOC__ {{#if:{{#var:self}}|| __NOEDITSECTION__ }} {{#var:header}} | </noinclude><includeonly>{{#if: | ||
{{Footnote|handle=OpenSim|The OpenSim LSL compiler will not do this implicitly. You will need to use an explicit check.}} | |||
}}{{#vardefine:pe_name|{{{statement_end|}}}}}{{#vardefine:pe_desc|{{#var:p_{{#var:pe_name}}_desc}}{{{statement_end_desc|}}}}}{{#vardefine:p1_name|{{{p1_name|}}}}}{{#vardefine:p1_type|{{{p1_type|}}}}}{{#vardefine:p_{{#var:p1_name}}_desc|{{#var:p_{{#var:p1_name}}_desc}}{{{p1_desc|}}}}}{{#vardefine:p2_name|{{{p2_name|}}}}}{{#vardefine:p2_type|{{{p2_type|}}}}}{{#vardefine:p_{{#var:p2_name}}_desc|{{#var:p_{{#var:p2_name}}_desc}}{{{p2_desc|}}}}}{{#vardefine:p3_name|{{{p3_name|}}}}}{{#vardefine:p3_type|{{{p3_type|}}}}}{{#vardefine:p_{{#var:p3_name}}_desc|{{#var:p_{{#var:p3_name}}_desc}}{{{p3_desc|}}}}}{{#vardefine:p4_name|{{{p4_name|}}}}}{{#vardefine:p4_type|{{{p4_type|}}}}}{{#vardefine:p_{{#var:p4_name}}_desc|{{#var:p_{{#var:p4_name}}_desc}}{{{p4_desc|}}}}}{{#vardefine:p5_name|{{{p5_name|}}}}}{{#vardefine:p5_type|{{{p5_type|}}}}}{{#vardefine:p_{{#var:p5_name}}_desc|{{#var:p_{{#var:p5_name}}_desc}}{{{p5_desc|}}}}}{{#vardefine:p6_name|{{{p6_name|}}}}}{{#vardefine:p6_type|{{{p6_type|}}}}}{{#vardefine:p_{{#var:p6_name}}_desc|{{#var:p_{{#var:p6_name}}_desc}}{{{p6_desc|}}}}}{{#vardefine:p7_name|{{{p7_name|}}}}}{{#vardefine:p7_type|{{{p7_type|}}}}}{{#vardefine:p_{{#var:p7_name}}_desc|{{#var:p_{{#var:p7_name}}_desc}}{{{p7_desc|}}}}}{{#vardefine:p8_name|{{{p8_name|}}}}}{{#vardefine:p8_type|{{{p8_type|}}}}}{{#vardefine:p_{{#var:p8_name}}_desc|{{#var:p_{{#var:p8_name}}_desc}}{{{p8_desc|}}}}}{{#vardefine:p9_name|{{{p9_name|}}}}}{{#vardefine:p9_type|{{{p9_type|}}}}}{{#vardefine:p_{{#var:p9_name}}_desc|{{#var:p_{{#var:p9_name}}_desc}}{{{p9_desc|}}}}}{{#vardefine:p10_name|{{{p10_name|}}}}}{{#vardefine:p10_type|{{{p10_type|}}}}}{{#vardefine:p_{{#var:p10_name}}_desc|{{#var:p_{{#var:p10_name}}_desc}}{{{p10_desc|}}}}}{{#vardefine:p11_name|{{{p11_name|}}}}}{{#vardefine:p11_type|{{{p11_type|}}}}}{{#vardefine:p_{{#var:p11_name}}_desc|{{#var:p_{{#var:p11_name}}_desc}}{{{p11_desc|}}}}}{{#vardefine:p12_name|{{{p12_name|}}}}}{{#vardefine:p12_type|{{{p12_type|}}}}}{{#vardefine:p_{{#var:p12_name}}_desc|{{#var:p_{{#var:p12_name}}_desc}}{{{p12_desc|}}}}}{{#vardefine:return_end| {{#if:{{#var:pe_desc}}|{{HoverText|{{#var:pe_name}}|{{#var:pe_desc}}}}|{{#var:pe_name}}}}}}{{#vardefine:name|{{{statement}}}}}{{#vardefine:type|flow control}}{{#vardefine:template|none}}{{#ifeq:{{#var:mode}}|god|{{{{#ifeq:{{#var:mode}}|god|LSL_Generic/god|!}}|}} }}{{#ifeq:{{#var:mode}}|request|{{{{#ifeq:{{#var:mode}}|request|LSL_Generic/request|!}}|}} }}{{#if:{{{deprecated|}}}{{{depreciated|}}}|{{{{#if:{{{deprecated|}}}{{{depreciated|}}}|LSL_Generic/deprecated|!}}|{{{deprecated|}}}{{{depreciated|}}}|}}}}{{#vardefine:mode|{{#var:mode}}{{{mode|}}}}}{{#vardefine:self|{{#var:self}}{{{self|}}}}}{{#vardefine:sort|{{#if:{{#var:sort}}|{{#var:sort}}|{{#if:{{{sort|}}}|{{{sort}}}|{{ucfirst:{{#var:name}}}}}}}}}}{{#vardefine:header_footnote|{{{statement_desc|}}}}}{{#vardefine:header_desc|{{{statement_type|}}}}}{{#vardefine:separator|<nowiki>;</nowiki>}}{{#vardefine:header_text|{{LSL_Generic/Text}}}}{{#vardefine:header_title|{{#if:{{{statement_title|}}}|{{{statement_title|}}}|{{LSL_Generic/Title}}}}}}{{#ifeq:{{NAMESPACE}}|Template|<div></div>|<div id="RealTitleBanner" style="display:none;"><span id="RealTitle">{{#var:name}}</span></div>}} __NOTOC__ {{#if:{{#var:self}}|| __NOEDITSECTION__ }} {{#var:header}} | |||
<div id="box"> | <div id="box"> | ||
<h2>{{#var:header_title}}</h2> | <h2>{{#var:header_title}}</h2> | ||
Line 79: | Line 83: | ||
<h2>Specification</h2> | <h2>Specification</h2> | ||
<div style="padding: 0.5em"> | <div style="padding: 0.5em"> | ||
{{ | <!--LSL_Constants_Conditional - BEGIN--> | ||
<div style="float:left;"> | |||
{{{!}} {{Prettytable}} | |||
{{!}}+ '''Conditional Types''' | |||
{{!}}-{{Hl2}} | |||
!Type | |||
!Condition | |||
{{!}}- | |||
{{!}}[[integer]] | |||
{{!}}True if it is not zero. | |||
{{!}}- | |||
{{!}}[[float]] | |||
{{!}}True if it is not zero.{{Footnote|handle=OpenSim}} | |||
{{!}}- | |||
{{!}}[[string]] | |||
{{!}}True if its [[llStringLength|length]] is not zero. | |||
{{!}}- | |||
{{!}}[[key]] | |||
{{!}}True only if it is a valid key and not [[NULL_KEY]]. | |||
{{!}}- | |||
{{!}}[[vector]] | |||
{{!}}True if the vector is not [[ZERO_VECTOR]]. | |||
{{!}}- | |||
{{!}}[[rotation]] | |||
{{!}}True if the rotation is not [[ZERO_ROTATION]]. | |||
{{!}}- | |||
{{!}}[[list]] | |||
{{!}}True if the [[llGetListLength|length]] is not zero. | |||
{{!}}} | |||
</div> | |||
<!--LSL_Constants_Conditional - END--> | |||
{{#var:spec}}{{PBR}} | {{#var:spec}}{{PBR}} | ||
{{{spec|}}}{{PBR}} | {{{spec|}}}{{PBR}} |
Revision as of 18:09, 13 July 2014
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
{{LSL_Conditional |statement |statement_header |statement_desc |statement_end |statement_end_desc |p1_name|p1_desc |p2_name|p2_desc |p3_name|p3_desc |p4_name|p4_desc |p5_name|p5_desc |p6_name|p6_desc |p7_name|p7_desc |p8_name|p8_desc |p9_name|p9_desc |p10_name|p10_desc |p11_name|p11_desc |p12_name|p12_desc |constants |examples |helpers |also_header |also_functions |also_tests |also_articles |also_footer |notes |mode |deprecated |cat1 |cat2 |cat3 |cat4 }}
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
funckyloop( i; f; s; k; l; v; r ) statement_end
statement_type
• | i | – | i | |
• | f | – | f | |
• | s | – | s | |
• | k | – | k | |
• | l | – | l | |
• | v | – | v | |
• | r | – | r | |
• | statement_end | – | statement_end_desc |
A fictitious statement type
Specification
Type | Condition |
---|---|
integer | True if it is not zero. |
float | True if it is not zero.[1] |
string | True if its length is not zero. |
key | True only if it is a valid key and not NULL_KEY. |
vector | True if the vector is not ZERO_VECTOR. |
rotation | True if the rotation is not ZERO_ROTATION. |
list | True if the length is not zero. |
spec
Examples
examples
Notes
notes
Useful Snippets
helpers
See Also
also_header
Events
- also_events
Functions
- also_functions
Tests
- also_tests
Articles
- also_articles
also_footer