Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

Merge

配列要素をソースからターゲットにマージします。

Synopsis

Merge target=source

引数

Merge 文には、以下のパラメータがあります。

source ターゲット変数にマージされる変数の名前。通常は配列。
target ソースの内容のマージ先の変数名。

概要

ソース変数のノードはターゲット変数にある対応するノードを上書きし、下位のソースすべては対応する下位ターゲットを上書きします。他のすべてのターゲット・ノードは変更されません。CopyMerge の唯一の違いは、Copy がターゲット・ノードを削除するのに対して、Merge が削除しない点です。

Erase source, target

target(1) = "node 1"
target(1,1) = "node 1,1"
target(2) = "node 2"
target(3,1) = "node 3,1"
source(3,2) = "node 3,2"

Merge target=source

Println Exists(target(3,1)) 'is still defined, returns 1
Println Exists(target(3,2)) 'does now exist, returns 1

関連項目

FeedbackOpens in a new tab