Oxygen Basic

Programming => Problems & Solutions => Topic started by: Peter on August 11, 2014, 03:19:19 PM

Title: SpanOf
Post by: Peter on August 11, 2014, 03:19:19 PM
Deleted
Title: Re: SpanOf
Post by: Charles Pegge on August 11, 2014, 10:06:23 PM
Hi Peter,

Yes, off by a factor of 10! I'll investigate.

This will dimension correctly:

sys a[] = {0,1,2,3,4,5,6,7,8,9}

or

sys a = {0,1,2,3,4,5,6,7,8,9}


Fixed: :)

http://www.oxygenbasic.org/o2zips/Oxygen.zip
Title: Re: SpanOf
Post by: Charles Pegge on August 12, 2014, 01:34:51 AM
No, it only works on the original static array. You will need to pass this information to the procedure accessing the array.
Title: Re: SpanOf
Post by: Charles Pegge on August 12, 2014, 05:39:26 AM
Alternatively, you can store size, and other information in unused elements.

negative indexbases are possible:

indexbase -1
% size 100 'span=102 :)
sys a[size] : a[-1]=size