[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re: About the VALUE clause
From: |
Roger While |
Subject: |
[open-cobol-list] Re: About the VALUE clause |
Date: |
Wed Jun 1 11:34:24 2005 |
"F =".
Fields in the FILE SECTION are not initialized.
It is not required by the Cobol standard and some compilers
will not allow you to reference the fields before the file has been
opened. In fact, some compilers only allocate this area at file open time.
So, that's the "F ="
Correct sequence would be :
OPEN INPUT TESTFILE.
INITIALIZE F-REC.
Now to "L = SU".
It is a programming error to reference a linkage section field
that has not been passed. Normally this would lead to a segmentation
fault.
Correct would be :
IF NUMBER-OF-CALL-PARAMETERS > 0
DISPLAY "L = " L
END-IF
Values on an external item are ignored.
(As it is not known at compile time if the item
has been previously allocated).
There really should be a warning. However,
the generated code is correct.
Roger
Roger
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [open-cobol-list] Re: About the VALUE clause,
Roger While <=