From Second Life Wiki
Jump to navigation Jump to search
integer llForeach(array name);

walks through the Array name Returns 0 if array name does not exist and 1 otherwise.

Reasons against this proposal in its current incarnation

  1. This proposed syntax does not fit with the style of LSL. The C# syntax for foreach would be more in place with LSL.
  2. The function return is nonsensical, the code shouldn't compile if the array doesn't exist. LSL is strong typed.
  3. Because of LSL's strongly typed bytecode, support for heterogeneous lists or arrays would be if not impossible, cumbersome.
  4. New bytecodes would have to be implemented for this feature not to very bytecode intensive.