[Gambas-user] Strange error with arrays

Eilert eilert-sprachen at ...221...
Tue Feb 22 18:11:32 CET 2005


Hi Rob,

I have re-written everything to array objects, and it runs well this way.

Rob schrieb:
> On Tuesday 22 February 2005 03:08, Eilert wrote:
> 
>>>  else if (ctype.id == T_ARRAY)
>>>  {
>>>    ERROR_panic("Don't know how to copy arrays");
>>>  }
>>
>>However, in the help, this way of introducing arrays is
>>described, so why shouldn't it work? If it does not work this
>>way, I'll rewrite them all as array objects, there is no big
>>problem. Just thought it would be easier this way.
> 
> 
> I see what you mean.  Benoit, would it be possible to remove the 
> internal array functionality, but leave the syntax there so it 
> transparently manipulates array objects behind the scenes?  I 
> think we are in for lots of problems like this one with two 
> parallel array implementations.

Will be somewhat tricky, just think of multi-dimensional arrays with 
some value being 0: myarr(0,6) which I had here (changed it to [x * y] 
instead of [x, y] and made sure that 0 is always turned to 1...)

Oh, and I missed Boolean[], so I took Byte[] instead. It works (I 
thought it won't take as much memory as integer[] :-) ) but would you 
have done the same?

Rolf





More information about the User mailing list