gdgqler wrote:
On 6 Jan 2010, at 17:04, Ralf Reköndt wrote:
gdgqler wrote:
In TK3 sold by Digital Precision there are three commands
SARRAY filename,array saves the array to the file
SARRAY_O is the same as SARRAY but overwrites an original file
LARRAY filename,array loads an array from the file
The saved arrays have the following header:
Position Item
0 'ATK3'
4 Array type (as in the BASIC name table so $0301 is a
string array) 6 Offset to data
8 Number of dimensions
10 Index 1
12 Multiplier 1
14 Index 2
16 Multiplier 2
.. ...
Offset Start of data
Just to make it a bit more complete:
Commands
SARRAY name,array save an array to a file
SARRAY_O name,array SARRAY with overwrite
LARRAY name,array load an array from a file
SORT array$ sort 2-dimensional string array
SORT array$,field sort 3-dimensional string array by field
SORT_I array$ ,field inverted SORT
Functions
ADIM (name) find no. of dimensions of a saved array
ADIMN (name,i) find dimension i of a saved array
ATYP (name) find type of a saved array
The functions make it very comfortable, as you can first check the file,
then DIM the array. Why not compilable?
Cheers...Ralf
I was quite wrong. You can indeed compile these with TURBO. The reason I
said you couldn't was probably that, at the time I was trying out SARRAY
and LARRAY, I did not know that the filename had to be in quotes for
TURBO. I know better now!
Ahh, you should have asked...;-) I was there, when Martin has written the
code and was *very* interested, that it worked with QLib.
Ok, I miss another FNs:
SEARCH (array$,search$,start) search 2-dimensional string array
from start for
search$
SEARCH (array$,search$,start,field) search 3-dimensional string array
from start for
search$ using field
Cheers...Ralf
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm