Re: Reset data




"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in message
news:Pm7Fh.58212$k82.45339@xxxxxxxxxxxxxxxxxxxxxxxxx
Pete,
Although NOT related to this specific example, there was one time that
there USED to be a "good reason" for using
Move Table1 to Tabl
instead of
Initialize Tabl

In the '85 Standard (when INITIALIZE was introduced) it was
"non-conforming" to try to INITIALIZE a record that included an OCCURS
DEPENDING ON item in it, i.e. a "variable occurrence table". Although
SOME vendors provided extensions to allow this, it was not made "legal"
source code until the '02 Standard. Therefore, one could initialize a full
table (including various Comp-? fields) only by "saving" an initial value
table and moving it to the target one.

There was also the whole question of whether one did or did not want to
initialize FILLER fields and initialize "to VALUE clause". Again, both
of these were made "standard" in the '02 Standard, but were only available
as extensions in a FEW compilers before that.

Again, for THE specific example, below, using the "MOVE ZERO-TABLE to
TABELLE" seems unnecessary. Also, as all the fields are DISPLAY NUMERIC
without SIGNS, I would guess that a MOVE ZERO should work OK (although I
have rarely seen 'real-world' examples where this works as desired).


Thanks Bill.

Appreciate the background.

My position is unchanged :-)

Pete.


.



Relevant Pages

  • Re: Numeric Edited and VALUE/MOVE
    ... Initialize Num-Edi to Value ... then all would work "as defined in the Standard". ... MYFLD PIC ZZZ,Z VALUE ALL '9'. ... What happens when you INITIALIZE MYFLD TO VALUE? ...
    (comp.lang.cobol)
  • Re: [C++] Need help with program please
    ... a return statement can involve the construction and copy of a ... That's what the function return mechanism does -- initialize the ... The standard clearly specifies that returning an rvalue ... >>perspective, objects have addresses, but temporaries don't. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: "a < b < c" not the same as "(a < b) && (b < c)"?
    ... >> One question is what are automatic variables in a function (not ... I'm going to take that as including pointers. ... initialize anything I use, so I never really think about it. ... > Have you considered getting a copy of the standard? ...
    (comp.lang.c)
  • Re: Array initalization doubt.
    ... If I initialize a structure, I initialize it fully for the sake of ... Neither of these reasons is a critique of either the standard, ... programming in which clarity of code plays a much more important role than ...
    (comp.lang.c)