[Gambas-user] integer / string file IO issue

Beren Scott berenscott at ...1979...
Mon Jun 8 10:06:41 CEST 2009


On Mon, 2009-06-08 at 07:19 +0200, Benoît Minisini wrote:
> > On Sun, 2009-06-07 at 12:19 +0200, Benoît Minisini wrote:
> > > > > So, it's a 64bit issue, is there a fix for this yet?
> > > >
> > > > I'm not sure, but I guess so. I was working on the networking
> > > > component, so I was busy. Now I'm free to look at that bug!
> > > >
> > > > Regards,
> > >
> > > OK, the bug is fixed in revision #2005!
> > >
> > > This was not a 64 bits bug, but two uninitialized flags that made INPUT
> > > (and LINE INPUT) becoming bad only on 64 bits systems.
> >
> > Well, I am going to say a big thankyou mate, it's working, oh and as for
> > those really large arrays, I descovered the beauty of resize. Learn
> > something everyday hey. I will leave you with one last idea for
> > improvement, perhaps extending the MAX and MIN commands beyond 2
> > arguments. Anyways, enjoy your day, now I can get to the hard stuff.
> >
> > Beren
> >
> 
> Min() and Max() had a variable number of arguments in the past. But I noticed 
> that most of the time, you use it with two arguments, and having a fixed 
> number of arguments makes them faster.
> 
> Regards,
> 

If you only needed it with two arguements, you'd probably do say an
if/else statement, but it's my experience coming from a perspective of
using spreadsheets, that most min or max statements require a vast
number of arguments. In my program, I use 3 arguments, which means to
get around the limitation I have to call the max() 3 times, once around
the first two arguments, the second time around the last 2 arguments and
the third time around the 2 max commands. Sure could get away with 2,
but still.

Anyways, maybe what you could do is have like min and max with 2, and
create say a min5 max5 that has 5 arguments maximum, so that either you
use the faster min max or you go with the bulkier min5 max5 commands?
Just a thought. Though these commands are definitely designed for large
amounts of arguments, in openoffice spreadsheet there is no true limit
to the arguments as the target area can be vast in scale.

Beren





More information about the User mailing list