695 pts.
 Can anyone please tell me what is the basic difference between arrays and tables in RPG.
Hi All,

Can anyone please tell me what is the basic differance between arrays and tables in RPG and for which type of requirement we have to use arrays and tables.

since there might be bit difference between both of them.

Please explain me.



Software/Hardware used:
ASKED: November 18, 2009  5:56 AM
UPDATED: November 18, 2009  7:28 PM

Answer Wiki:
Arrays - I use these a lot but rarely use tables - seems like all the new development was in arrays Array math xFOOT, array = x * array. array3 = array2 * array1 Clear array clears the entire array - should work for table lookup finds value in array - should work for table linked tables lookup in table1, return value from table2 Arrays can now be made of data structures Arrays can now be items in data strucutres Arrays can now be in arrays Phil
Last Wiki Answer Submitted:  November 18, 2009  11:07 am  by  philpl1jb   44,110 pts.
All Answer Wiki Contributors:  philpl1jb   44,110 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

Names of Tables must start with TAB
Tables came first and were usually defined in the program.

 32,825 pts.

 

I still want multi-dimensional arrays

array(x:y) would be much clear than outer(x).inner(y)

 7,175 pts.

 

generally speaking, tables are preloaded at compilation or program initiation and not changed during program execution … tables are most often used as a checklist or range against which variables or fields are compared using lookup operations ….tables do not have an index value available to the program to tell you which position the element occupies in the table …

arrays are more fluid and are often used to group values together, to alter or manipulate or total these values, or to search or format them … indexes are used to identify individual elements of the array, and care must be taken by the programmer to make sure never to refer to an element by an index value outside the defined range of the array or the program will abend …

 405 pts.