Re: The MOVE problem
- From: "Judson McClendon" <judmc@xxxxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 14:02:51 -0500
"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.
--
Judson McClendon judmc@xxxxxxxxxxxxx (remove zero)
Sun Valley Systems http://sunvaley.com
"For God so loved the world that He gave His only begotten Son, that
whoever believes in Him should not perish but have everlasting life."
.
- Follow-Ups:
- Re: The MOVE problem
- From: Bill Gunshannon
- Re: The MOVE problem
- References:
- The MOVE problem
- From: Roger While
- Re: The MOVE problem
- From: Robert
- Re: The MOVE problem
- From: Bill Gunshannon
- The MOVE problem
- Prev by Date: Re: The MOVE problem
- Next by Date: Re: The MOVE problem
- Previous by thread: Re: The MOVE problem
- Next by thread: Re: The MOVE problem
- Index(es):
Relevant Pages
|