Link | lp_iterate |
Author | Bil Corry |
Category | Utility |
Version | 8.x |
License | Public Domain |
Posted | 19 Apr 2006 |
Updated | 17 May 2006 |
More by this author... |
Similar to iterate, but does not require the looping var.
lp_iterate: (:'a','b','c'); loop_item; /lp_iterate; lp_iterate: (:'a','b','c'), local:'abc'; #abc; /lp_iterate;
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_iterate', -description='Similar to iterate, but does not require the looping var.', -priority='replace', -looping, -required='data', -optional='loop_item'; // based on code from John Burwell, LPA list 8/18/2005 local:'return' = string; local:'varname' = '_lp_loopitem_' (lp_string_random: 4); (var:#varname) = null; process: "[ define_tag:'loop_item',-priority='replace'; return: @$"#varname"; /define_tag; ]"; if: (local_defined:'loop_item'); #loop_item = @(var:#varname); /if; loop: #data->size; (var:#varname)->detachreference; (var:#varname) = @#data->(get: loop_count); #return += run_children; /loop; return: #return; /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft