ID:1506011
 
For In List Entry:

Format:
for (Var [as Type] [in List]) Statement

Args:
Var: A variable to sequentially contain each member of the list.
List: The list to loop through. This defaults to the whole world.
Type: One or more of area, turf, mob, or obj, ORed together. If no type is specified, the declared type of Var will be used to skip over inappropriate elements in the list.


However I've noticed something. If you create datums, for(var/path in world) doesn't work but for(var/path) does. The reference says world is the default, but it says "whole world".

Does world not include the entire object tree? Granted you have to store them in a list or refer to then in some way anyway, but just curious.

Demo for you weirdos:
world/New()
..()

var/num=15
while(num)
var/speshuldatums/sd = new
sd.ID=num
speshuldatums_oftheworld +=sd
num --

var/speshuldatums_oftheworld = list()

client/verb/CheckDatums()

world << "world check:"
for(var/speshuldatums/sd in world) world << " [sd.ID]"

world << "<br><br>"

world << "null/default check:"
for(var/speshuldatums/sd) world << " [sd.ID]"

speshuldatums
var/ID = 0


world means world.contents, which means anything contained within the contents list of an atom.

Things that only exist as references don't exist inside of world.contents, nor do items of the /client type.
I'm aware but then should it not be more clarified more in the reference?