Difference between revisions of "User talk:LepreKhaun Resident/Workaround4Escaped Chars within JsonText"

From Second Life Wiki
Jump to navigation Jump to search
(Loop)
 
m (~_~)
Line 4: Line 4:
<lsl>while ((iter = ++iter + (type == JSON_OBJECT)) < listLength)</lsl>
<lsl>while ((iter = ++iter + (type == JSON_OBJECT)) < listLength)</lsl>
For readability and speed I would recommend this:
For readability and speed I would recommend this:
<lsl>int step = 1 + (type == JSON_OBJECT);
<lsl>integer step = 1 + (type == JSON_OBJECT);
while ((iter += step) < listLength)</lsl>
while ((iter += step) < listLength)</lsl>
-- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 10:15, 14 October 2013 (PDT)
-- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 10:15, 14 October 2013 (PDT)

Revision as of 10:15, 14 October 2013

Loop

That is a little ugly. <lsl>while ((iter = ++iter + (type == JSON_OBJECT)) < listLength)</lsl> For readability and speed I would recommend this: <lsl>integer step = 1 + (type == JSON_OBJECT); while ((iter += step) < listLength)</lsl> -- Strife (talk|contribs) 10:15, 14 October 2013 (PDT)