Logo

Programming-Idioms

History of Idiom 51 > diff from v20 to v21

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

Version 20

2016-01-28, 19:35:26

Version 21

2016-02-07, 17:23:30

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
// This works for a number of Pascal containers, including TFPGMap.
m.IndexOf(k) >= 0
Code
m.IndexOf(k) >= 0
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