feature request : for

new topic     » topic index » view thread      » older message » newer message


I have been duplicating loops when i need only one, if the following were possible:

for dirloop = {0..9,A..Z,a..z} do -- lists of atoms, use directly 
 if dir(rootdir & dirloop) then 
    -- code 
 end if 
end for 
-- 
for looptr = {animals[1..$],bacteria[1..$]} do -- lists of ranges, index to each one 
 if -- etc, process each animal and bacteria 
end for 
-- 
for csvlineptr = 1 to length(csv_txt) do 
  for fieldptr = {3,4,8} do -- list of atoms, step thru them 
    -- code to munge csv_txt fields 3, 4, and 8 in all lines 
  end for 
end for 


Basically, if the [START to END] is replaced with a sequence, or a series of atoms, or a list of sequences, step thru them (instead of stepping thru the default list of integers 1,2,3,4,5,6,7,8,9 etc). Yes, i realise this would be window dressing (eye candy) on other ways of doing it. Your mileage may vary.

useless

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu