
MERGE(2)                   silmul_efun                   MERGE(2)

名称
     merge - 把两个阵列(array)或对应(mapping)合并成一个

语法
     mixed merge(mixed *arg1, mixed *arg2);

描述
     If arg1 and arg2 are mappings, returns arg1 + arg2.  If arg1
     and  arg2  are arrays, merge returns a mapping for which the
     elements in arg1 serve as the indexes to  the  corresponding
     elements in arg2.  In other words, if arg1 is ({ "1", "2" })
     and arg2 is ({ "A", "B" }), merge(arg1, arg2) returns ([ "1"
     :  "A",  "2"  :  "B"  ]).  If arg1 and arg2 are not the same
     length, the mapping will only be as long as the  shorter  of
     the two arrays.

     If arg1 and arg2 aren't both mappings or both arrays,  merge
     returns zero.

作者
     Ichabod@TMI, 2/25/93
     wade@future 4/8/1996 翻译

MudOS Release 0.9         Last change:                   3-19-93

