Re: The MOVE problem



In article <5dLVi.57745$c9.57091@xxxxxxxxxxxxxxxxxxxxxx>,
"Judson McClendon" <judmc@xxxxxxxxxxxxx> writes:
"Bill Gunshannon" <billg999@xxxxxxxxxxx> wrote:
Robert <no@xxxxxx> writes:
"Roger While" <simrw@xxxxxxxxxxxx> wrote:

IDENTIFICATION DIVISION.
PROGRAM-ID. MOVEX.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 AA.
03 A PIC 9 OCCURS 9.
01 CC.
03 C PIC 9 OCCURS 9.
01 B PIC 9.
PROCEDURE DIVISION.
MOVE "987654321" TO AA.
MOVE "123456789" TO CC.
MOVE 3 TO B.
MOVE A(B) TO B C(B).
DISPLAY CC.
DISPLAY B.
GOBACK.

What shouzld be displayed in various compatible modes?

123456789
7

I got:

123456389
7

which is about what I expected, but I am not sure that the correct
answer isn't compiler dependant. Does the standard address actual
order of execution for things like this? Or side effects?

Net Express 3.1:

123456789
7

I think the subscripts should properly be calculated before the MOVE,
as Net Express apparently does here.

That was what I meant by my question. Does the standard say that all
expressions shold be evaluated before the MOVE? Or shoud expressions
be evaluated as you progress thru the statement? Or, (and not having
read the standard this is what I would have expected based on their
handling of other items) is it un-defined and therefore left up to the
mplementor?

bill

--
Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
bill@xxxxxxxxxxxxxxx | and a sheep voting on what's for dinner.
University of Scranton |
Scranton, Pennsylvania | #include <std.disclaimer.h>
.



Relevant Pages

  • Re: Assumption of standard
    ... right - by petition and award - to display banners of their own. ... States has no legitimate right to display a standard. ... You yourself display arms which are used ...
    (rec.heraldry)
  • Re: Big Canon Announcement
    ... The HD journey tried to reach a single worldwide standard, however it had to settle on a compromise of mutual compatibility. ... I don't think that an HD display cares what the delivered frame rate is as long as the rate is described in the headers of the data stream. ... As a camera designer (not conventional video, but output to HD screens) I have had the misfortune of having one HD screen be damaged in preparation for a customer demo and have to be replaced by something similar from exactly the same manufacturer. ...
    (rec.photo.digital.slr-systems)
  • Re: Assumption of standard
    ... right - by petition and award - to display banners of their own. ... States has no legitimate right to display a standard. ...
    (rec.heraldry)
  • Re: Screen resolution vs DVD resolution
    ... mapping from say WMV to the video display when a DVD-video is generated. ... second and they use the PAL standard for TV.) ... Also keep in mind that there is a lot more to the tv picture than what you ... a tv doesn't really have a set resolution like a computer ...
    (microsoft.public.powerpoint)
  • Re: SF moment
    ... The 'Sec was the standard size of all such units, ... ALPHA-NUMERIC, 26 of the studs bore the letters of the alphabet, while ... CALENDAR also used the screen for display, ... up through the optical link with any special data required for a ...
    (rec.arts.sf.written)