Mysterious Parse Error in switch statement
Mysterious Parse Error in switch statement
- Subject: Mysterious Parse Error in switch statement
- From: Sven Hoffmann <email@hidden>
- Date: Thu, 18 Dec 2003 13:54:32 +0200
- Resent-date: Thu, 18 Dec 2003 14:24:40 +0200
- Resent-from: Sven Hoffmann <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-sender: email@hidden
- Resent-to: email@hidden
Hi,
I wrote this pretty usual switch stetement:
const unichar constOperatorChar = [operator characterAtIndex:0];
switch(constOperatorChar){
case 'k':
float cmyk[4];
for (i = 0; i < 4; i++){
cmyk[i] = [[words objectAtIndex:i]floatValue];
}
[NSColor colorWithDeviceCyan:cmyk[0] magenta:cmyk[1]
yellow:cmyk[2] black:cmyk[3] alpha:1];
case 'v':
case 'V':
default:
}
i keep getting a parse error before "float"
that is in right after the first case label 'k'.
without any code after the labels it compiles fine and the statement
itself seems okay.
adding any code after the label makes it complain.
does anybody have a clue what could be wrong here??
thanks,
sven
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.