gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Re: initialization problems


From: Keisuke Nishida
Subject: [open-cobol-list] Re: initialization problems
Date: Thu Feb 26 00:26:01 2004
User-agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryƍmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI)

At Wed, 25 Feb 2004 21:36:30 -0500 (EST),
David Korn wrote:
> 
> I have enclosed two programs that demonstrate the initialization
> is not working correctly.  In both of these programs the field
> that is being displayed does not have an initial value.
> In the first program, if you remove the declaration for either
> IP1B036-BUILD-FICB-INTFC or IP1B002-FICB, then FIX-120793
> gets initialized to '0'.  Otherwise, it is an empty string.

Right, it was a bug recently produced.  I have fixed it in CVS.
Thanks for your report.

However,

> =====================prog18.c======================
>        IDENTIFICATION DIVISION.
>        PROGRAM-ID.     PROG18.
>        DATA DIVISION.
>        WORKING-STORAGE SECTION.
>        01  IP1B053-IP1AS19-CALL-AREA.
>            05  IP1B053-IP1AS19-TIME.
>                10  IP1B053-IP1AS19-TIME-B        PIC  9(09) COMP.
>                10  FILLER                        PIC  9(09) COMP.
>            05  IP1B053-TIME-2 REDEFINES IP1B053-IP1AS19-TIME.
>                10  IP1B053-IP1AS19-TIME-D        PIC  9(15) COMP-3.
>            05  IP1B053-IP1AS19-DATE              PIC  9(15) COMP-3.
>        01  IP1B053-IP1AS19-CALL-REDEF REDEFINES
>            IP1B053-IP1AS19-CALL-AREA.
>            05  IP1B053-IP1AS19-INDIC             PIC  X(01).
>                88  B053-ABSTIME-FORMAT           VALUE 'B'.
>                88  B053-CLOCK-FORMAT             VALUE 'D'.
>        PROCEDURE DIVISION.
>            DISPLAY      'INDIC=' IP1B053-IP1AS19-INDIC.
>            GOBACK.
> =====================end prog18.c======================

This program still displays an empty string because
IP1B053-IP1AS19-INDIC is a redefinition of 
IP1B053-IP1AS19-TIME-B IN IP1B053-IP1AS19-CALL-AREA,
which has the initial value zero.

Keisuke


reply via email to

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