CopyMap()

Syntax

Result = CopyMap(SourceMap(), DestinationMap())
Description
Copy every element of the source to the destination map.

Parameters

SourceMap() The map to copy from.
DestinationMap() The map to copy to. The existing elements in this map will be freed. After a successful copy, the two maps are identical.

Return value

Returns nonzero on success and zero on failure. If the two maps do not have the same type then the copy will fail.

Example

  NewMap Age()
  NewMap AgeCopy()

  Age("John")  = 15
  Age("Elise") = 30

  CopyMap(Age(), AgeCopy())

  Debug AgeCopy("John")
  Debug AgeCopy("Elise")

See Also

CopyArray(), CopyList()

Supported OS

All

<- ClearMap() - Map Index - DeleteMapElement() ->