gdgqler wrote:
On 6 Jan 2010, at 08:43, <[email protected]> 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
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to