[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Re: INITIALIZE (Bug Report)
From: |
Roger While |
Subject: |
[open-cobol-list] Re: INITIALIZE (Bug Report) |
Date: |
Sat Dec 3 09:56:29 2005 |
The FILLER item is cleared by INITIALIZE.
I think that it should exclude the FILLER item.
Sample Code
IDENTIFICATION DIVISION.
PROGRAM-ID. TESTFILLER.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 X.
03 A PIC X(1).
03 FILLER PIC X(2) VALUE "OK".
03 B PIC X(1).
PROCEDURE DIVISION.
INITIALIZE X.
DISPLAY "INITIALIZE(FILLER) TEST [" X "]".
It is likely to be able to evade by the following corrections.
cobc/codegen.c : 1180 (initialize_type Function)
//if ( *f->name == '$' && p->flag_statement && !f->children )
if ( f->name[4] == '$' && p->flag_statement && !f->children )
return INITIALIZE_NONE;
No, it's not so simple.
Cobol2002 -
INITIALIZE X WITH FILLER.
The syntax, we already accept.
Let me look at ANSI85 and MF. Hmm.
Seems as though that 2002, 85, MF(OBJ), MF(SE) have different views here.
Bill ?
Roger
- [open-cobol-list] Re: INITIALIZE (Bug Report),
Roger While <=