Bug 212 : using a processing keyword as a variable name gives unhelpful error message
Last modified: 2005-11-15 13:04




Status:
ASSIGNED
Resolution:
-
Priority:
P2
Severity:
enhancement

 

Reporter:
timdiggins
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-11-15 12:47
if you use a processing keyword (e.g. "color") as a variable name, eg:

int color = 0xFF;
void setup(){
color = 0x80;
}
void draw(){
background(color);
}

Then you get a error message such as "unexpected token: int" which is
somewhat confusing to the novice. Is it possible to parse this so that a
more helpful message (such as even "unexpected token: color") is given?
Additional Comment #1 From fry 2005-11-15 13:04
noted, thanks. there's a bunch of other ones like this under "PDE /
Compiler & Preprocessor" in processing/todo.txt.