Logo

Programming-Idioms

History of Idiom 170 > diff from v11 to v12

Edit summary for version 12 by Bart:
New Pascal implementation by user [Bart]

Version 11

2018-09-21, 13:25:04

Version 12

2019-01-02, 11:03:15

Idiom #170 Get map size

Set n to the number of elements stored in mymap.

This is not always equal to the map capacity.

Idiom #170 Get map size

Set n to the number of elements stored in mymap.

This is not always equal to the map capacity.

Extra Keywords
length count
Extra Keywords
length count
Imports
fgl
Code
n := MyMap.Count;
Comments bubble
Map is not a native Pascal type.
The fgl unit defines several generic prototypes for maps.
All of which have a Count property.