CopyMap()

语法

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

参数

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.

返回值

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

示例

  NewMap Age()
  NewMap AgeCopy()
  
  Age("John")  = 15
  Age("Elise") = 30
  
  CopyMap(Age(), AgeCopy())
  
  Debug AgeCopy("John")
  Debug AgeCopy("Elise")

参阅

CopyArray(), CopyList()

已支持操作系统

所有

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