Difference between revisions of "Template:LSL Function/boolean"

From Second Life Wiki
Jump to: navigation, search
m (this template was always too complicated and mostly useless ~_~)
m
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#if:
+
{{LSL Injection Test}}{{#if:
  
{{#vardefine:p_{{{1|}}}_desc|{{#if:{{{bool|}}}|{{HoverLink|boolean{{#var:lang}}|A type that can only be true or false|boolean}},}} {{{pd|}}} {{LSL Const{{#var:lang}}|TRUE|integer|1}} {{#if:{{{td|}}}|{{{td|}}}|enables}}, {{LSL Const{{#var:lang}}|FALSE|integer|0}} {{#if:{{{fd|}}}|{{{fd|}}}|disables}}}}
+
{{#vardefine:nbdv|{{#switch:{{uc:{{{default|}}}}}|T|TRUE=true|F|FALSE=false}}}}
  
{{#vardefine:p_{{{1|}}}_hover|{{#if:{{{bool|}}}|boolean, }}{{#if:{{{ph|}}}|{{{ph|}}} |{{{pd|}}} }}TRUE {{#if:{{{th|}}}|{{{th|}}}|{{#if:{{{td|}}}|{{{td|}}}|enables}}}}, FALSE {{#if:{{{fh|}}}|{{{fh|}}}|{{#if:{{{fd|}}}|{{{fd|}}}|disables}}}}}}
+
{{#vardefine:p_{{{1|}}}_desc|{{#if:{{{bool|}}}|{{HoverLink|boolean{{#var:lang}}|A type that can only be true or false|boolean}},}} {{{pd|}}} {{#if:{{{bool|}}}{{{pd|}}}|{{#ifeq:{{{if|}}}|*|if|{{{if|}}}}}|{{ucfirst:{{#ifeq:{{{if|}}}|*|if|{{{if|}}}}}}}}} {{#vardefineecho:TRUE|{{LSL Const{{#var:lang}}|TRUE|integer|1}}}}{{#vardefine:FALSE|{{LSL Const{{#var:lang}}|FALSE|integer|0}}}}{{#if:{{{non-zero|}}}|{{Footnote|handle=non-zero|Any value that is not zero/{{#var:FALSE}} is treated the same as {{#var:TRUE}}. This behavior should not be depended upon.|Any value that is not zero/FALSE is treated the same as TRUE. This behavior should not be depended upon.}}}}{{#ifeq:{{#var:nbdv}}|true| ({{HoverText|default|default for new objects etc}})}} {{#if:{{{td|}}}|{{{td|}}}|enables}}, {{#ifeq:{{{if|}}}|*|if|{{{if|}}}}} {{#var:FALSE}}{{#ifeq:{{#var:nbdv}}|false| ({{HoverText|default|default for new objects etc}})}} {{#if:{{{fd|}}}|{{{fd|}}}|disables}}}}
 +
 
 +
{{#vardefine:p_{{{1|}}}_hover|{{#if:{{{bool|}}}|boolean,}} {{#if:{{{ph|}}}|{{{ph|}}}|{{{pd|}}}}} {{#if:{{{bool|}}}{{{pd|}}}{{{ph|}}}|{{#ifeq:{{{if|}}}|*|if|{{{if|}}}}}|{{ucfirst:{{#ifeq:{{{if|}}}|*|if|{{{if|}}}}}}}}} TRUE{{#ifeq:{{#var:nbdv}}|true| (default)}} {{#if:{{{th|}}}|{{{th|}}}|{{#if:{{{td|}}}|{{{td|}}}|enables}}}}, {{#ifeq:{{{if|}}}|*|if|{{{if|}}}}} FALSE{{#ifeq:{{#var:nbdv}}|false| (default)}} {{#if:{{{fh|}}}|{{{fh|}}}|{{#if:{{{fd|}}}|{{{fd|}}}|disables}}}}}}
  
 
}}<noinclude>
 
}}<noinclude>
 
{| {{Prettytable}}
 
{| {{Prettytable}}
|+<code><nowiki>{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2}}</nowiki></code>{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2}}
+
|+<code><nowiki>{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2|default=false}}</nowiki></code>{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2|default=false}}
 
|-{{Hl2}}
 
|-{{Hl2}}
 
! #var
 
! #var
Line 15: Line 17:
 
|-
 
|-
 
{{VarPair|p_bool_hover}}
 
{{VarPair|p_bool_hover}}
 +
|-
 +
{{Footnotes}}
 
|}
 
|}
 
{| {{Prettytable}}
 
{| {{Prettytable}}
Line 25: Line 29:
 
|-
 
|-
 
{{VarPair|p_bool_hover}}
 
{{VarPair|p_bool_hover}}
 +
|-
 +
{{Footnotes}}
 +
|}
 +
{| {{Prettytable}}
 +
|+<code><nowiki>{{{{FULLPAGENAME}}|bool|bool=*|if=*|non-zero=*|pd=1|ph=2|td=3|th=4|fd=5|fh=6}}</nowiki></code>{{{{FULLPAGENAME}}|bool|bool=*|if=*|non-zero=*|pd=1|ph=2|td=3|th=4|fd=5|fh=6}}
 +
|-{{Hl2}}
 +
! #var
 +
! value
 +
|-
 +
{{VarPair|p_bool_desc}}
 +
|-
 +
{{VarPair|p_bool_hover}}
 +
|-
 +
{{Footnotes}}
 +
|}
 +
{| {{Prettytable}}
 +
|+<code><nowiki>{{{{FULLPAGENAME}}|bool|if=when|non-zero=*|td=3|th=4|fd=5|fh=6}}</nowiki></code>{{{{FULLPAGENAME}}|bool|if=when|non-zero=*|td=3|th=4|fd=5|fh=6}}
 +
|-{{Hl2}}
 +
! #var
 +
! value
 +
|-
 +
{{VarPair|p_bool_desc}}
 +
|-
 +
{{VarPair|p_bool_hover}}
 +
|-
 +
{{Footnotes}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Latest revision as of 20:43, 23 December 2013

{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2|default=false}}
#var value
p_bool_desc boolean, 1 TRUE enables, FALSE (default) disables
p_bool_hover boolean, 2 TRUE enables, FALSE (default) disables
{{{{FULLPAGENAME}}|bool|bool=*|pd=1|ph=2|td=3|th=4|fd=5|fh=6}}
#var value
p_bool_desc boolean, 1 TRUE 3, FALSE 5
p_bool_hover boolean, 2 TRUE 4, FALSE 6
{{{{FULLPAGENAME}}|bool|bool=*|if=*|non-zero=*|pd=1|ph=2|td=3|th=4|fd=5|fh=6}}
#var value
p_bool_desc boolean, 1 if TRUE[1] 3, if FALSE 5
p_bool_hover boolean, 2 if TRUE 4, if FALSE 6
{{{{FULLPAGENAME}}|bool|if=when|non-zero=*|td=3|th=4|fd=5|fh=6}}
#var value
p_bool_desc When TRUE[1] 3, when FALSE 5
p_bool_hover When TRUE 4, when FALSE 6