Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, 言語解説書

例 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 ステートメントは、 NameItem という 引数で  2 Outsub プロシージャーを呼び出します。
 2 
Outsub は、Prmain から 渡される NameItem に そのパラメーターの AB を関連付けます。 Outsub が実行されると、A に対する各参照は、 Name に対する参照と見なされ、B に対する各参照は、 Item に対する参照と見なされます。
 3 
put list (A,B) ステートメントは、 デフォルトの出力ファイル SYSPRINT へ NameItem の値を送ります。
 4 
入り口定数として Outsub の宣言では、引数およびパラメーターの 属性が突き合わせられるので、パラメーター記述子は ENTRY 属性で指定する 必要はありません。 ENTRY 属性も参照してください。

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)