Logo

Programming-Idioms

History of Idiom 51 > diff from v21 to v22

Edit summary for version 22 by :
[Pascal] Comments: not inside the code

Version 21

2016-02-07, 17:23:30

Version 22

2016-02-18, 16:57:59

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Idiom #51 Check if map contains key

Determine whether map m contains an entry for key k

Imports
uses fgl, classes;
Imports
uses fgl, classes;
Code
m.IndexOf(k) >= 0
Code
m.IndexOf(k) >= 0
Comments bubble
This works for a number of Pascal containers, including TFPGMap.
Comments bubble
This works for a number of Pascal containers, including TFPGMap.
Doc URL
http://wiki.freepascal.org/Generics#fgl_unit
Doc URL
http://wiki.freepascal.org/Generics#fgl_unit