DECLARE 文 (.NET COBOL)

手続き部本文内でローカル変数を 1 つ以上宣言します。インライン ローカル変数の範囲は、宣言のポイントから最奥の包含ブロックの最後までです。段落、セクション、メソッド全体は、ブロックと見なされます。

コンテキスト:

手続き部 

declare-statement

AS 型指定子を使用した DECLARE 文の構文
DECLARE 文の一般的な構文

       declare i1 as binary-long
       display i1 
         
       *>   Optionally, the variables can be initialised inline 
        declare c2 as condition-value = true
        display c2

        declare string-list2 as string occurs 3 = table of string("Bill", "Ben", "LittleWeed")

ローカル変数のサンプルも参照してください。このサンプルは、[スタート > すべてのプログラム > Micro Focus Visual COBOL > Samples]COBOL for .NET の場合の場合 に用意されています。