gnucobol-users
[Top][All Lists]
Advanced

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

[open-cobol-list] Re: Initialize


From: Guenter . Sandner
Subject: [open-cobol-list] Re: Initialize
Date: Mon Jun 6 08:26:15 2005

Hello all,

after applying the following changes

+ if (*f->name == '$')     <- FILLER is not initialized.
+   return INITIALIZE_NONE;
+

both the explicit initialize and the implicit initialize (at program
startup works as expected.
the filler will not be changed by explicit initialize statements, but will
be initialized at program startup.


But after changing the following lines, it doesn't work:

+ if (f->redefines && (!topfield || !p->flag_statement
     || !f->file))          <- FILE SECTION Initialize Support
     return INITIALIZE_NONE;


I guess this is a typo,  i think it should be changed to:
+ if (f->redefines && (!topfield || !p->flag_statement
     || f->file))          <- FILE SECTION Initialize Support
     return INITIALIZE_NONE;


kind regards
Guenter






Peg <address@hidden> on 06.06.2005 16:19:22


To:    address@hidden
cc:
Subject:    Re: [open-cobol-list] Re: Initialize


Hello all,

address@hidden wrote:
 > except that the FILLER will be initialized too.
How about this?

static int
initialize_type (struct cb_initialize *p, struct cb_field *f)
{
   if (f->flag_external)
     return INITIALIZE_EXTERNAL;

- if (f->redefines)
+ if (f->redefines && (!topfield || !p->flag_statement
     || !f->file))          <- FILE SECTION Initialize Support
     return INITIALIZE_NONE;

   if (p->val && f->values)
     return INITIALIZE_ONE;

+ if (*f->name == '$')     <- FILLER is not initialized.
+   return INITIALIZE_NONE;
+
   if (f->children)

--
Peg, PegStyle mailto:address@hidden
http://members8.tsukaeru.net/pegstyle/
(OpenCOBOL MinGW Binary Download Site.
  But Japanese Page Only)





reply via email to

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