April 26, 2024, 11:56:30 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Problem with variable names in declarations

Started by LarryMc, February 13, 2007, 04:47:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

It seems the IDE doesn't line variable names that start with "new"
This code
int newflag
string newtext
istring newitext[10]
uint newnum

displays like this
Quoteint newflag
string newtext
istring newitext[10]
uint newnum
but functionality appears to be okay

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Rod

I'm writing from memory here (so please forgive me if I'm wrong), but I think that "new" is a keyword. The IDE is probably not running with exactly the same rules as the parser, so it may treat the string "new" as a keyword and colorize it as such.

What happens if "new" is not the first part of the name? For example, "int isNew".

LarryMc

QuoteWhat happens if "new" is not the first part of the name? For example, "int isNew".
No problem there.  That displays fine.
Appears incorrectly only when new is preceeded by a space(like a keyword as you mentioned).

int newflag   -bad
int new_flag -bad
int newton  -bad
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library