Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Peter on July 08, 2011, 01:35:03 PM
Title:
Wrong value
Post by:
Peter
on
July 08, 2011, 01:35:03 PM
Deleted
Title:
Re: Wrong value
Post by:
Charles Pegge
on
July 08, 2011, 11:37:46 PM
Yes it was using a byte accumulator instead of full width, Peter. I have widened the accumulator now and posted the update.
Thanks!
Code: OxygenBasic
'BYTE TYPE TESTS
'===============
#indexbase
0
sys
v
Dim
a(1)
as
byte
a(0) =0x80
a(1) =0x0
v = a(0) + a(1)*256
print
v
'answer 128
a(0) =0x0
a(1) =0x1
v = a(0) + a(1)*256
print
v
'answer 256
v = a(0) + a(1)*384
print
v
'answer 384
'OVERFLOW TEST
a(1)=0
a(0)=255
a(0)+=2
print
a(0) " " a(1)
'answer 1 0
'CLEAR VAR TEST
v=512 : a(0)=1
v=a(0)
print
v
'answer 1
Charles
Title:
Re: Wrong value
Post by:
Charles Pegge
on
July 09, 2011, 02:10:54 AM
I'm sending all my immediate updates to Oxygen (in-progress) on the website downloads page.
Charles
Title:
Re: Wrong value
Post by:
Charles Pegge
on
July 09, 2011, 03:33:10 AM
I checked by downloading the zip myself, and it was okay, but I have now posted a new one. - Slightly newer version.
Charles
PS I used the standard windows zip facility.
Title:
Re: Wrong value
Post by:
Charles Pegge
on
July 09, 2011, 06:56:00 AM
I've checked downloading through Chrome, Explorer, using Windows and 7zip.
The file is 2,170,023 bytes (2.06 Meg). One of your screens shows 2,016,929 bytes. So something caused it to truncate.
I am posting the dll here temporarily.
(updated in later post)
Charles