Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB664PE v3.10.0 is now live for X-Mas!!
#51
(12-29-2023, 08:53 PM)bert22306 Wrote:
(12-29-2023, 09:16 AM)SMcNeill Wrote: Damn! Thing is, I always use hex the way you had "always assumed." Always hex number unsigned. I guess, no huge big deal, it's going to take some trial and error to see what old programs of mine will break. I guess I never ran into the problem in my Qbasic days.

Wait. If I do x = Val("&h" + "ffff")

Will I still get x = 65535

It will, but honestly, it probably shouldn't.  LOL!

This is *ONLY* changing CONST and the internal evaluations that we do with it.  

From what you've posted, it appears that VAL is probably also broken -- unless QB45 was just weird in that aspect and decided that the VAL of a hex number should always return unsigned, even if the number was stored in a signed variable.

Code: (Select All)
DIM h AS INTEGER
h = -1
PRINT VAL("&H" + HEX$(h))

Prints 65535.




Anyone got a handy version of QB45 up and running to test and see what VAL("&HFFFF") prints in it?  Is it odd, or are we missing compatibility here too, like we were with CONST?
Reply
#52
(12-30-2023, 12:15 AM)SMcNeill Wrote: Anyone got a handy version of QB45 up and running to test and see what VAL("&HFFFF") prints in it?  Is it odd, or are we missing compatibility here too, like we were with CONST?


In QB45 VAL("&HFFFF") prints -1

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#53
Code: (Select All)
DIM h AS INTEGER
h = -1
PRINT VAL("&H" + HEX$(h))
QB64PE Returns 65535 when ran.
QBasic Returns -1 when ran.

I know that QB45 was asked for so a little newer version tells it continued for newer than QB45. I know QBasic is an interpreter ide and don't compile source code like QB45 or QBX 7.1.
Reply
#54
I just notice that serial communication does not work anymore:
Code: (Select All)
Open "COM4:74880,N,8,1,BIN,CS0,DS0,RB8192" For Random As #99
Above statement has always worked up till 3.8.0
Now recompiling with 3.10.0 (and 3.9.0) the program is aborted at this line, not responding to 'On Error' around it...

Anyone know what/when this has changed?
45y and 2M lines of MBASIC>BASICA>QBASIC>QBX>QB64 experience
Reply




Users browsing this thread: 3 Guest(s)