You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

[ |../../index.htm#lansa/ladtgub3_0305.htm]
現在地:

8.4.4 名前付きのパラメータ

メソッド、キー付きプロパティ、関数ライブラリ・ルーチンのすべてのパラメータには、名前があります。そのようなルーチンを式の中の操作として呼び出す場合は、以下のように記述するのが普通です。
Invoke #COM_OWNER.MethodOne ParmOne(1) ParmTwo(2) ParmThree(#RESULT)   
これと同じ結果を得るために、以下の構文で割り当てステートメントを使用することもできます。
#RESULT = #COM_OWNER.MethodOne( 1, 2 )   
ParmOneが任意指定で、デフォルトを使用するのであれば、ParmTwoを名前で指定することによって、ParmOneの位置の値を指定しないで簡単にParmTwoの値を渡すことができます。
#RESULT = #COM_OWNER.MethodOne( ParmTwo := 2 )  #RESULT = #COM_OWNER.MethodOne( ParmTwo := ((#A + #B) * #C) )   
[ |../../index.htm#lansa/ladtgub3_0305.htm]

  • No labels