Difference between revisions of "Print"

From Second Life Wiki
Jump to navigation Jump to search
m (format glitch)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LSL Header|
{{Multi-lang}}{{LSL Header|
}}{{#vardefine:name|print
}}{{#vardefine:name|print
}}{{#vardefine:p_value_desc|value or variable to be printed to stdout
}}{{#vardefine:p_value_desc|value or variable to be printed to stdout
}}{{#vardefine:header_title|{{#var:name}}({{LSL Param|value}});
}}{{#vardefine:header_title|{{#var:name}}({{LSL Param|value}});
}}{{#vardefine:header_text|{{{!}}
}}{{#vardefine:header_text|{{{!}}
Returns a variable of the same type as the input parameter
{{LSL DefineRow|type|value|{{#var:p_value_desc}}}}
{{LSL DefineRow|type|value|{{#var:p_value_desc}}}}
{{!}}}
{{!}}}
}}{{#vardefine:examples|
}}{{#vardefine:examples|<source lang="lsl2">//Make the server beep on click
}}{{#vardefine:notes|
string bell = "%07";
 
default
{
    state_entry()
    {
        bell = llUnescapeURL(bell);
    }
    touch_start(integer a)
    {
        print(bell);
    }
}
</source>
}}{{#vardefine:notes|* '''print''' is a reserved word, meaning it can't be used for user identifiers.
* This feature of LSL should probably never be used by anyone other than LL.
}}{{#vardefine:caveats|
}}{{#vardefine:caveats|
}}{{#vardefine:helpers|
}}{{#vardefine:helpers|
Line 18: Line 32:
}}{{#vardefine:also_tests|
}}{{#vardefine:also_tests|
}}{{#vardefine:location|
}}{{#vardefine:location|
}}{{LSL Generic}}
}}{{LSL Generic}}{{LSLC|Keywords}}
{{#if:{{#var:examples}}||{{LSLC|Needs Example}}}}

Latest revision as of 02:45, 6 May 2017

The correct title of this article is print. The initial letter is shown capitalized due to technical restrictions.

print(value);

print(value);
• type value value or variable to be printed to stdout

Examples

//Make the server beep on click
string bell = "%07";

default
{
    state_entry()
    {
        bell = llUnescapeURL(bell);
    }
    touch_start(integer a)
    {
        print(bell);
    }
}

Notes

  • print is a reserved word, meaning it can't be used for user identifiers.
  • This feature of LSL should probably never be used by anyone other than LL.