George Gwilt writes:

> Turbo cannot  set sliced arrays as parameters to S*BASIC procedures or
> functions. This is because of the way the array descriptors are defined.
However it
> is theoretically possible to set a sliced array as parameter to a machine
code
> extension since Turbo defines an S*BASIC descriptor. Unfortunately I
cannot
> see at the moment a way of doing this in practice. Also I had thought that
> programs could be fairly easily written to avoid slicing.

There are often good reasons for using array slices. Although work-arounds
are usually possible, they may require shifting data into other arrays which
is both time and space consuming.

An array descriptor merely presents a logical view of the data. If Turbo
at present just sees that a parameter is an array and ignores any indices,
then parsing those indices would have to be implemented - something that
could be a major job! If, however, the indices are accessable to Turbo, then
its simply a matter of creating a descriptor based on those indices - not
much more difficult than creating the descriptor for the whole array?

Per

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to