360 pts.
 MOVEA Equivalent command in free format RPG
Hi, I have to move each character in a string to an array. In RPG, I can very well use the command MOVEA for this purpose but I don’t know exact command in free format RPG. Can anyone help me on this regards?

Software/Hardware used:
ASKED: February 12, 2009  7:25 AM
UPDATED: March 17, 2009  4:01 PM

Answer Wiki:
Hi, You should be able to use %subarr. Regards, Martin Gilbert. ------------------------------------------------------ <pre> d chars ds d char 1a dim(10) d string s 10a inz('abcdefghij') d out s 3a c eval chars = string * out = 'cab' c eval out = char(3) + char(1) + char(2) </pre> This will do it for you Kevin C Ketzler - <a href="http://www.aresgrp.com">Affiliated</a> aka BigKat OR.. D ds D Text 10 D Arr3 1 dim(10) overlay(text:1) D Arr1 s 1 dim(10) D Arr2 s 1 dim(10) D Txt1 s 10 /free // Move one array to another Arr2 = Arr1; Arr2 will be the same as Arr1 // Move a single string to array elements Text = Txt1; // Arr3 will contain the original chars // Move an array to a single string Txt1 = Text; Txt1 will contain all the elements of Arr3 Thanks Cpatain Ron
Last Wiki Answer Submitted:  March 17, 2009  4:00 pm  by  BigKat   7,185 pts.
All Answer Wiki Contributors:  BigKat   7,185 pts. , Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

OR
D ds
D Text 10
D Arr3 1 dim(10) overlay(text:1)

D Arr1 s 1 dim(10)
D Arr2 s 1 dim(10)
D Txt1 s 10

/free
// Move one array to another
Arr2 = Arr1; Arr2 will be the same as Arr1

// Move a single string to array elements
Text = Txt1; // Arr3 will contain the original chars

// Move an array to a single string
Txt1 = Text; Txt1 will contain all the elements of Arr3

 1,780 pts.