[prev in list] [next in list] [prev in thread] [next in thread]
List: gambas-user
Subject: Re: [Gambas-user] Problem with Byte datatype ?
From: Simonart Dominique <simonart.dominique () wanadoo ! fr>
Date: 2009-01-29 22:04:59
Message-ID: 4982280B.2080909 () wanadoo ! fr
[Download RAW message or body]
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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
Sorry for missing needed information:
Gambas 2.8 OpenSuse 11.0
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic