QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: TempodiBasic on August 20, 2019, 04:50:56 pm

Title: QB64Ide: No CamelCase of name of variables into functions
Post by: TempodiBasic on August 20, 2019, 04:50:56 pm
in the IDE QB64 1.3
the name of a variable is not adjusted as declared if you write it in plain

copy and past in Qb64ide to see if the array XyZvW is written right as argument of functions like UBOUND or LEN.

Code: QB64: [Select]
  1. REDIM SHARED XyZvW(1 TO 3) AS INTEGER
  2. COLOR 3: PRINT " Green ";: COLOR 7: PRINT "Before ";: COLOR 12: PRINT "Orange  ";: COLOR 7: PRINT " After ";: COLOR 15: PRINT "White ";: COLOR 7: PRINT "Lenght"
  3. Ridimensiona
  4. Ridimensiona
  5. Ridimensiona
  6.  
  7. SUB Ridimensiona
  8.     COLOR 3: PRINT UBOUND(xyzvw);
  9.     REDIM XyZvW(1 TO INT(RND * 10) + 1) AS INTEGER
  10.     COLOR 12: PRINT , UBOUND(xyzvw);
  11.     COLOR 15: PRINT , LEN(xyzvw)
  12.     COLOR 7, 0

this is different from old QB45  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: QB64Ide: No CamelCase of name of variables into functions
Post by: Bert22306 on August 20, 2019, 08:21:54 pm
Tempo, it all works perfectly if you add a statement on top:

DIM SHARED XyZvW(10)

Edit: No it doesn't now. What happened? Have to play with this some more.
Title: Re: QB64Ide: No CamelCase of name of variables into functions
Post by: bplus on August 20, 2019, 08:48:48 pm
I believe this problem was pointed to once before. It does not interfere with the way the code functions.
Title: Re: QB64Ide: No CamelCase of name of variables into functions
Post by: SMcNeill on August 20, 2019, 08:57:40 pm
It’s a long standing issue with QB64.  It doesn’t affect anything but the cosmetics of the program, so it’s not a large priority issue to fix.  ;)
Title: Re: QB64Ide: No CamelCase of name of variables into functions
Post by: FellippeHeitor on August 20, 2019, 08:58:31 pm
Old known bug, but used to only affect UBOUND and LBOUND https://github.com/Galleondragon/qb64/issues/11
Title: Re: QB64Ide: No CamelCase of name of variables into functions
Post by: TempodiBasic on August 21, 2019, 08:25:58 am
Hi friends

it seems that I arrive late to this point....

yes the problem is more estetich than of other nature...
it is related to the feature of QB64 to modify every name of a variable into text of code.
This not happen for the names that are in parenthesis of Ubound  Lbound and it seems also LEN

Code: QB64: [Select]
  1. DIM Xy(1 TO 3) AS INTEGER
  2.  
  3. Xy(1) = 0
  4. PRINT Xy(2)
  5. PRINT LEN(Xy(1))
  6.  
  7.  
Thanks for feedbacks