Arrays in Squirrel

Hey impers,


Does anyone know how to safely check for the existence of an array entry without crashing out if its not there? In php it would be isset().

For example:

if (isset(value[“command”]))
{
     // do something with value[“command”]
}

From the Wiki & the “nv” table example:


// Update a field in the table if it is present
// else initialise the table with a field
if ((“nv” in getroottable()) && (“count” in nv))
{
nv.count++;
}
else
{
nv <- {count = 1};
}
</div>

Ah, thats the one. Thanks.