Returns the absolute value of a number
Len(value=[any])
value
any
true
The number to return the absolute value of
Pass a structure as an argument to the function.
user = {
ID : 1,
FIRSTNAME : "Han",
LASTNAME : "Solo",
MOVIE : "Star Wars"
};
writeDump( structCount( user ) );
Result: 4
Having a reference of a structure as a variable, use the dot notation to get a key count on it using a member function.
user = {
ID : 1,
FIRSTNAME : "Han",
LASTNAME : "Solo",
MOVIE : "Star Wars"
};
writeDump( user.count() );
Result: 4
animals = {
COW : "moo",
PIG : "oink"
};
animalCount = animals.count();
echo( "There are " & animalCount & " animal(s) in the 'animals' struct" );
animals = {
COW : "moo",
PIG : "oink"
};
animalCount = StructCount( animals );
echo( "There are " & animalCount & " animal(s) in the 'animals' struct" );