MapSize()

Syntax

Result = MapSize(Map())
Description
Returns the number of elements in the specified map. It does not change the current element.

Parameters

Map() The map to use.

Return value

Returns the number of elements in the map.

Remarks

This function is very fast (it doesn't iterate all the map but uses a cached result) and can be safely used to determine if a map is empty or not.

Example

  NewMap Country.s()

  Country("FR") = "France"
  Country("US") = "United States"

  ; Will print '2'
  Debug "Size of the map: " + Str(MapSize(Country()))

Supported OS

All

<- MapKey() - Map Index - NextMapElement() ->