Author Topic: Const difference between dev 1.5 and stable 1.4  (Read 4880 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Const difference between dev 1.5 and stable 1.4
« on: February 04, 2021, 09:53:57 pm »
I started checking constants from initial Qwerkey file alert (Pi in the Sky) and ran into a red line pretty quickey, see attached.

  [ You are not allowed to view this attachment ]  


FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #1 on: February 04, 2021, 10:05:32 pm »
It doesn't have to do with CONST, but with CamelCase. Making keywords all caps makes the error go away. Thanks for reporting.
« Last Edit: February 04, 2021, 10:07:16 pm by FellippeHeitor »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Const difference between dev 1.5 and stable 1.4
« Reply #2 on: February 04, 2021, 10:37:08 pm »
Error go away, another way, see attached
  [ You are not allowed to view this attachment ]  

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #3 on: February 04, 2021, 10:38:14 pm »
Interesting.

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #4 on: February 04, 2021, 11:08:38 pm »
Please get the latest dev build, generated just now from git 64d149b. I believe I fixed the const+camelcase issue.

Also, check out the new auto-complete feature...


Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Const difference between dev 1.5 and stable 1.4
« Reply #5 on: February 04, 2021, 11:15:46 pm »
@FellippeHeitor I found another weird one

SunSize%% is coming up -12  ???

Code: QB64: [Select]
  1. Const PiSizeLess1% = 499, PiDisp% = 100, SunSize%% = 500, AmblinHalf%% = 50
  2. Print PiSizeLess1%; PiDisp%; SunSize%%; AmblinHalf%% '>>>  SunSize%% -12 ??? wierd!
  3.  
  4.  

I will check your next version. Oh man that's (auto-complete) going to be something!
« Last Edit: February 04, 2021, 11:18:11 pm by bplus »

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #6 on: February 04, 2021, 11:20:48 pm »
You are forcing the constant to have the type _BYTE (-128 to 127). Are you following my logic?
« Last Edit: February 04, 2021, 11:21:49 pm by FellippeHeitor »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Const difference between dev 1.5 and stable 1.4
« Reply #7 on: February 04, 2021, 11:21:23 pm »
%% is a byte, with values from -128 to 127.  Your value of 500 is overflowing and only  returning the one byte out of your two-byte value.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Const difference between dev 1.5 and stable 1.4
« Reply #8 on: February 04, 2021, 11:25:58 pm »
Yeah got it, did not recognize the suffix for some reason I was thinking LONG like it is double an Integer ;-))

Anyway, I wonder if Qwerkey knew what he was doing there.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Const difference between dev 1.5 and stable 1.4
« Reply #9 on: February 05, 2021, 03:03:22 pm »
Not directly CONST related, but nevertheless it seems to match into this topic.
Probably another camel case issue? At least it worked in earlier (pre-camel) versions.

Positive/negative DECIMAL numbers with explicit type suffix added are not highlighted anymore (eg. 3.14#, 25&, -4096&& etc.)

As said it affects decimal numbers only, &B/&H/&O prefixed numbers such as &HFF&&, &B1111& are working ok.

BTW - It doesn't matter if camel case is on/off, it's not highlighted in either mode.
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #10 on: February 05, 2021, 03:04:15 pm »
Will check. Do you remember when it used to work?

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Const difference between dev 1.5 and stable 1.4
« Reply #11 on: February 05, 2021, 03:17:37 pm »
At least it worked until stable v1.4, but not in the current dev build. Will look in the repo to find the last git before camel case was injected and test, hold on for 5 mins.

UPDATE:
So it is already broken in git b28a929 from Jan/30, which was right before the introduction of camel case, so obviously that's not the cause of it, going back further...
« Last Edit: February 05, 2021, 03:35:40 pm by RhoSigma »
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #12 on: February 05, 2021, 03:33:48 pm »
Just confirmed it worked ok in 1.4. The highlighter was tweaked in 1.5 because it was not working for scientific notation numbers - I apparently missed that usage you're showcasing here too (cause I never use it). Thanks for letting me know.

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #13 on: February 05, 2021, 03:43:25 pm »
Likely the changes introduced in https://github.com/QB64Team/qb64/commit/8f19321c06870b83be1b7d6a1d894ddc5a662dac - thanks for helping look for it!

FellippeHeitor

  • Guest
Re: Const difference between dev 1.5 and stable 1.4
« Reply #14 on: February 05, 2021, 04:05:45 pm »
@RhoSigma, if you can, please grab the dev build I just pushed now into the repo (from git 711e686), and the issue should be fixed.