例 1
Prmain: procedure;
declare Name character (20),
Item bit(5),
4 Outsub entry;
1 call Outsub (Name, Item);
end Prmain;
2 Outsub: procedure (A,B);
declare A character (20),
B bit(5);
3 put list (A,B);
end Outsub;
- 1
- Prmain の CALL ステートメントは、
Name と Item という
引数で 2 の Outsub プロシージャーを呼び出します。
- 2
- Outsub は、Prmain から
渡される Name と Item に
そのパラメーターの A と B を関連付けます。
Outsub が実行されると、A に対する各参照は、
Name に対する参照と見なされ、B に対する各参照は、
Item に対する参照と見なされます。
- 3
- put list (A,B) ステートメントは、
デフォルトの出力ファイル SYSPRINT へ Name と Item の値を送ります。
- 4
- 入り口定数として Outsub の宣言では、引数およびパラメーターの
属性が突き合わせられるので、パラメーター記述子は ENTRY 属性で指定する
必要はありません。
ENTRY 属性も参照してください。
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)