MapGetSS ( Map M, String I ) -> String

MapGetSI ( Map M, String I ) -> int

These functions use I to locate the index-value pair < I,V > in map M
and return V.

If the pair < I,V > does not exist then MapGetSS and MapGetIS quietly
adds < I,"" > to M and returns the null string,

and MapGetSI and MapGetII quietly adds < I,0 > to M and returns 0.
-----------------------------------------------------------------------------------
If the type of V is String and an int is expected then the value
atoi(V) is returned. The entry was previously created by MapSetSS,
perhaps. There are other ways of converting a string to an integer,
but assume a valid 32-bit integer will result.

If the type of V is int and a string is expected then V is converted to
a string
----------------your choice design decision--------------------
which then replaces the old value of V (which must be
properly disposed of), and V is returned.
|