yTin Online Help  

  Home (english) | Home (chinese) | Downloads | Sample scripts | Online help | Utilities | FAQs | Discussions/Messages | Mud&links | My Progs | Mirrors |

format:            #loop {start,finish} {command(s)}

Like a for-next loop, will loop from start to finish incrementing or
decrementing by 1 each time through.   The value of the loop variable is
places in %0, and can be used in the command(s).   If start>finish, it will
loop backwards.

#loop {1,3} {get all %0.corpse}
equivalent to the following:
   get all 1.corpse;get all 2.corpse;get all 3.corpse
#var n 3
#loop {$n,1} {drop %0.key}
equivalent to
   drop 3.key;drop 2.key;drop 1.key

See also: #forall