Post Reply 
FOR IN {} suggestion for HP team
12-01-2014, 10:00 AM
Post: #2
RE: FOR IN {} suggestion for HP team
In programming languages that use a for-construct to do list processing, the list is often not modifiable during the loop. I usually need to add elements to the list during processing, and thus use the pattern below:


LOCAL lst = { ... whatever .. };
WHILE SIZE(lst) DO
LOCAL element=head(lst);
lst:=tail(lst);

...
END;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
FOR IN {} suggestion for HP team - Gilles - 11-22-2014, 01:59 PM
RE: FOR IN {} suggestion for HP team - lenborje - 12-01-2014 10:00 AM
RE: FOR IN {} suggestion for HP team - Han - 12-01-2014, 04:15 PM
RE: FOR IN {} suggestion for HP team - Han - 12-01-2014, 06:54 PM



User(s) browsing this thread: 1 Guest(s)