- Nov
- 76
- 1
Hi all.
I want to load a file into an array, then resize it.
I want to load a file into an array, then resize it.
TYPE fruit
banana
pear
cherry
coconut
strawberry
pineapple
orange
pomegranate
kiwi
peach
SETARRAY /R fruit data
SETARRAY data
data[10]
ECHO %@ARRAYINFO[data,5] ** total cells in array **
10
DO x=0 TO 9 (ECHO [%x]: %data[%x])
[0]: banana
[1]: pear
[2]: cherry
[3]: coconut
[4]: strawberry
[5]: pineapple
[6]: orange
[7]: pomegranate
[8]: kiwi
[9]: peach
SETARRAY /Z data[10,3]
SETARRAY data
data[10,3]
ECHO %@ARRAYINFO[data,5] ** total cells in array **
30
DO x=0 TO 9 (DO y=0 TO 2 (ECHO [%x,%y]: %data[%x,%y]))
[0,0]:
[0,1]:
[0,2]:
[1,0]:
[1,1]:
[1,2]:
[2,0]:
[2,1]:
[2,2]:
[3,0]:
[3,1]:
[3,2]:
[4,0]:
[4,1]:
[4,2]:
[5,0]:
[5,1]:
[5,2]:
[6,0]:
[6,1]:
[6,2]:
[7,0]:
[7,1]:
[7,2]:
[8,0]:
[8,1]:
[8,2]:
[9,0]:
[9,1]:
[9,2]:
Data is gone!
So I think there's a bug with SETARRAY /Z because I can add and remove rows and columns in arrays; but as soon as extra dimensions are added, then the array is cleared.
Anyone else can corroborate this?
Mark/x13
Last edited: