Constructing an array value from a sequence
- Posted by doug edmunds <dae at WORLDACCESSNET.COM> Aug 19, 1997
- 696 views
I am looking for suggestions how to read and write a value into an object containing sequences at a particular array location given a sequence of integers. For example: I have a sequence called 'my_data' which containing sequences within sequences. The procedures will read the value of a selected part of 'my_data' and write a value to that location. Header of procedures: procedure Read_Data (sequence my_data, sequence data_location) procedure Write_Data (sequence my_data, sequence data_location) Required criteria of 'my_data' The data object will not have a fixed record length, but rather will contain variable size lists (within variable size lists): For example if my_data equals: {{"dog",{"beagle","spaniel", {"shepherd",{"large","small"}}}, {"colors",{"black","white"}}} then my_data[1][2][3] = {"shepherd",{"large","small"}} and has a sequence representation of {1,2,3} my_data[1][2][3][1] is equal to "large" (has the sequence value of {1,2,3,1}) and my_data[2][2][3] would produce an out-of-bounds error message. I have developed one method which will read the data given the sequence, but none so far that will write the data. Please do not suggest assembly code solutions. doug edmunds dae at worldaccessnet.com