bug-gnucobol
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] Re: INITIALIZE (Bug Report)


From: Roger While
Subject: RE: [open-cobol-list] Re: INITIALIZE (Bug Report)
Date: Sun Dec 4 02:35:01 2005

OK. Thanks Bill.

Fix is correct. Thanks.
CVS updated.
Snapshot tarball at the usual place.

Roger

The default (in the '02 Standard - and anyone else that I know of) is for
   *NOT* initializing FILLER fields

If an EXPLICIT "WITH FILLER" phrase is added (extension to '85 Standard and
part of the '02 Standard) then (and only then) is FILLER initialized.  There
is also the new "TO VALUE" phrase that can come into play with this.

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Roger While
> Sent: Saturday, December 03, 2005 11:54 AM
> To: address@hidden
> Cc: address@hidden
> Subject: [open-cobol-list] Re: INITIALIZE (Bug Report)
>
>
> >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
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]