Author Topic: Wrong value  (Read 3344 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Wrong value
« on: July 08, 2011, 01:35:03 PM »
Deleted
« Last Edit: May 07, 2015, 11:20:20 AM by Peter »

Charles Pegge

  • Guest
Re: Wrong value
« Reply #1 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
  1. 'BYTE TYPE TESTS
  2. '===============
  3.  
  4. #indexbase 0
  5.  
  6. sys v
  7.  
  8. Dim a(1) as byte
  9.  
  10. a(0) =0x80
  11. a(1) =0x0
  12.  
  13. v = a(0) + a(1)*256
  14. print v 'answer 128
  15.  
  16. a(0) =0x0
  17. a(1) =0x1
  18.  
  19. v = a(0) + a(1)*256
  20. print v 'answer 256
  21.  
  22. v = a(0) + a(1)*384
  23. print v 'answer 384
  24.  
  25.  
  26. 'OVERFLOW TEST
  27.  
  28. a(1)=0
  29. a(0)=255
  30. a(0)+=2
  31. print a(0) "  " a(1) 'answer 1 0
  32.  
  33.  
  34. 'CLEAR VAR TEST
  35.  
  36.  
  37. v=512 : a(0)=1
  38. v=a(0)
  39. print v 'answer 1
  40.  
  41.  

Charles

« Last Edit: July 08, 2011, 11:43:50 PM by Charles Pegge »

Charles Pegge

  • Guest
Re: Wrong value
« Reply #2 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

Charles Pegge

  • Guest
Re: Wrong value
« Reply #3 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.

Charles Pegge

  • Guest
Re: Wrong value
« Reply #4 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
« Last Edit: July 09, 2011, 03:12:19 PM by Charles Pegge »