View previous topic :: View next topic
|
Author |
Message |
ambesh
New User
Joined: 07 Jul 2005 Posts: 6 Location: pune
|
|
|
|
I have two array
one array A occurs 10 times.
It has picture clause pic x(2).
another array B occurs 10 times
it has piture clause pic x(3).
I have to copy A -> B in reverse order. |
|
Back to top |
|
|
senti
New User
Joined: 18 Aug 2005 Posts: 19
|
|
|
|
Hey Ambesh,
Since B has an extra byte, you may want to determine what it should have.Once that is determined, its just copying from A to B bytewise putting it in a loop.
Regds, Senti |
|
Back to top |
|
|
elonics
New User
Joined: 05 Jul 2005 Posts: 49 Location: India
|
|
|
|
Hi,
Do u mean u want copy A(1) to B(10).
If that's ur requirement. Here is one way to code .
Declare M as 1 and N as 10, K as 1 and L as -1.
PERFORM PARA-1 UNTIL M>10
PARA-1.
MOVE A(M) TO B(N)
ADD K to M
ADD L to N .
this will do ur task. if occurs is not 10 then work accordingly.
Elo'nics |
|
Back to top |
|
|
|