Difference between revisions of "Talk:Notecard reading"
Jump to navigation
Jump to search
m (a way to avoid losing information) |
m (added <syntaxhighlight> & reference to unsigned commentary) |
||
Line 1: | Line 1: | ||
A better way to handle this would be the following lines | A better way to handle this would be the following lines | ||
<syntaxhighlight lang="lsl2"> | |||
list tmp = llParseStringKeepNulls(data, ["="], []); | list tmp = llParseStringKeepNulls(data, ["="], []); | ||
string setting = llList2String(tmp, 0); | string setting = llList2String(tmp, 0); | ||
string param = llDumpList2String(llDeleteSubList(tmp, 0, 0), "="); | string param = llDumpList2String(llDeleteSubList(tmp, 0, 0), "="); | ||
</syntaxhighlight> | |||
This will not lose information | This will not lose information if the setting value includes a "<code>=</code>" in it. | ||
Also, setting the param value before checking setting will save code overall. | Also, setting the param value before checking setting will save code overall. | ||
{{unsigned|Earle Swenson|18 July 2008 21:27}} |
Latest revision as of 12:43, 29 April 2024
A better way to handle this would be the following lines
list tmp = llParseStringKeepNulls(data, ["="], []);
string setting = llList2String(tmp, 0);
string param = llDumpList2String(llDeleteSubList(tmp, 0, 0), "=");
This will not lose information if the setting value includes a "=
" in it.
Also, setting the param value before checking setting will save code overall.
—The preceding unsigned comment was added on 18 July 2008 21:27 by Earle Swenson