[Gambas-user] Problem with Byte datatype ?

Benoit Minisini gambas at ...1...
Fri Jan 30 00:41:47 CET 2009


On jeudi 29 janvier 2009, Simonart Dominique wrote:
> Dominique SIMONART a écrit :
> > Hi evererybody,
> >
> > If I code the few lines showed below:
> >
> > DIM X AS Byte
> > DIM Texte AS String[64]
> >
> >   X = &h2E
> >   X += &hE0
> >   TextBox1.Text = Hex(X)
> >   Texte[X] = Hex(X)
> >
> > I get '10E' displayed. Is this correct for a byte?
> > If you put a breakpoint on the TextBox1 line, the local variables show X
> > value as 14 (&h0E) which is correct.
> > and the last line ends wit an 'out of bounds' message.
> >
> > (as a workaround, I actually insert a' X = X MOD 256' instruction just
> > before the last line)
> >
> > If you wonder why the hell I've to use bytes, I'm working on a memory
> > capture of an Amiga program ("Captive") running inside the emulator
> > WinUAE. In those old days (twenty years ago), memory was 0.0005 Gb and
> > byte usage was quite common!
> > and more, the memory byte order was not compatible with the actual PC so
> > you have to read memory byte by byte to restore the Amiga organisation
> >
> > regards,
> > Dominique Simonart
> >
> >
> > -------------------------------------------------------------------------
> >----- This SF.net email is sponsored by:
> > SourcForge Community
> > SourceForge wants to tell your story.
> > http://p.sf.net/sfu/sf-spreadtheword
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> Sorry for missing needed information:
> Gambas 2.8 OpenSuse 11.0
>
> Dominique Simonart
>
>

Apparently there is a problem, both in Gambas 2 and Gambas 3. I will 
investigate...

-- 
Benoit Minisini




More information about the User mailing list