i'm trying to create a 1 dimensional array with 0 as number of cells in it and then dynamically load it with string data from data section using a procedure in a for loop however when i print the data inside the array i only get the last string and not the whole data... i don't understand what i'm doing wrong
here is the code:
Code: Select all
Dim arr.s(0)
Define.s r
Procedure sappend(Array arr.s(1), temp.s)
Define i = 0
ReDim arr(0 + i)
arr(i) = temp
i+1
EndProcedure
For i = 0 To 2
Read.s r
sappend(arr(),r)
Next
For i = 0 To 2
Debug arr(i)
Next
DataSection
Data.s "hello", "hi", "goodbye"
EndDataSection