Code: Select all
Global NewMap Country.s()
Country("US") = "United States"
Country("FR") = "France"
Country("GE") = "Germany"
If DeleteMapElement( Country() )
Debug Country()
EndIf
If DeleteMapElement( Country() )
Debug Country()
EndIf
If DeleteMapElement( Country() )
Debug Country()
EndIfCode: Select all
Procedure __DeleteMapElement( Map MapList.s( ), key.s = "" )
If key
DeleteMapElement(MapList(), key)
Else
DeleteMapElement(MapList())
EndIf
ResetMap(MapList())
NextMapElement(MapList())
If MapSize(MapList())
ProcedureReturn @MapList()
EndIf
EndProcedure
Global NewMap Country.s()
Country("US") = "United States"
Country("FR") = "France"
Country("GE") = "Germany"
If __DeleteMapElement( Country() )
Debug Country()
EndIf
If __DeleteMapElement( Country() )
Debug Country()
EndIf
If __DeleteMapElement( Country() )
Debug Country()
EndIfCode: Select all
Global NewMap Country.s()
Country("US") = "United States"
Country("FR") = "France"
Country("GE") = "Germany"
If DeleteMapElement( Country(), MapKey(Country()) )
Debug Country()
EndIf
If DeleteMapElement( Country(), MapKey(Country()) )
Debug Country()
EndIf
If DeleteMapElement( Country(), MapKey(Country()) )
Debug Country()
EndIf
