IonicWind Software

IWBasic => General Questions => Topic started by: LarryMc on February 13, 2007, 04:47:07 AM

Title: Problem with variable names in declarations
Post by: LarryMc on February 13, 2007, 04:47:07 AM
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

Title: Re: Problem with variable names in declarations
Post by: Rod on February 13, 2007, 08:21:26 AM
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".
Title: Re: Problem with variable names in declarations
Post by: LarryMc on February 13, 2007, 01:21:30 PM
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