I think I understand lists but I'm having some difficulties understanding arrays. I need arrays because my program has to cope with text data that can have multiple lines. In another post it said arrays should be used in this case as lists were based on single lines. Perhaps someone can give me an example of how to place blocks of text into an array, and how to get them out again?
Hi Tomas
Arrays are fairly easy to use, just create one then enter data into it, retrieve data from it.
The code below creates an array called
mydata having
10 rows and
3 columns
It then puts the value
hello into the cell of row
6 column
2It then retrieves the value from the cell of row
6 column
2Local okay,value
Put ArrayCreateFN('mydata',10,3) into okay
ArrayPutValue('mydata',6,2,'hello')
Put ArrayValueFN('mydata',6,2) into value
Note, usually the array name, number of rows and columns would be stored in variables but in the above example are used directly to make it easier to understand.
Also the okay value was not checked to see if the array was successfully created or not.
There is some info on arrays in the in-built help and help PDF.
http://www.hypernextandroid.com/binaries/HAC_help.pdfThe HyperNext Studio Language Reference PDF also has a chapter on arrays.
http://www.tigabyte.com/docs/LanguageReference.pdfMalkom