Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Illegal string-number conversion
#6
@TempodiBasic
We can also see this on the page https://qb64phoenix.com/qb64wiki/index.php/Variable  :

"Variables in QB64 can be any name except the names of QB64 or QBasic keywords and may not contain spaces or non-alphabetical/non-numerical characters (except "." and "_"). Numerical characters cannot be used as the first character of a variable or array name! QB64 reserves the use of a leading underscore to QB64 procedural or variable type names only!"

I notice that with OPTION _EXPLICIT we no longer get “Illegal string-number conversion” but instead:
“Variable ‘glop__ASCII_CHR_046__w__ASCII_CHR_046__element__ASCII_CHR_046__i’ (SINGLE) not defined”

I will now prefer using an underscore instead of a dot when naming variables; by using the dot exclusively for variables in a UDT, I’ll avoid triggering the parser bug. 

And from now on, I’ll be using OPTION _EXPLICIT.
Reply


Messages In This Thread
Illegal string-number conversion - by Herve - 07-02-2025, 07:02 PM
RE: Illegal string-number conversion - by Jack - 07-02-2025, 07:08 PM
RE: Illegal string-number conversion - by Herve - 07-02-2025, 07:25 PM
RE: Illegal string-number conversion - by Herve - 07-06-2025, 08:54 AM
RE: Illegal string-number conversion - by a740g - 07-07-2025, 09:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Maximum Number of Attachments per Thread Magdha 7 445 01-13-2026, 10:13 AM
Last Post: Magdha
Question Experimenting with a "StringList" type for simpler handling of string arrays/lists Heimdall 18 1,184 12-19-2025, 12:51 PM
Last Post: Heimdall
  Sub not Reconizing Dim as String pmackay 18 1,448 10-16-2025, 03:32 PM
Last Post: pmackay
  Conversion From CBASIC eoredson 0 350 10-07-2025, 01:05 AM
Last Post: eoredson
  getting the number of dimensions in an array on the fly? madscijr 7 721 09-16-2025, 12:34 AM
Last Post: madscijr

Forum Jump:


Users browsing this thread: