A89: What is wrong here?


[Prev][Next][Index][Thread]

A89: What is wrong here?




ok. Will somebody tell me what's wrong with this code (below), because I see 
nothing wrong with it, yet TIGCC throws the following errors:
1) missing braces around initializer for '(anonymous).xy'
2) invalid lvalue in unary '&'
3) missing braces around initializer for '(anonymous).xy'
4) invalid lvalue in unary '&'
here's the code:

#if TI89_VERSION
    #define SCREEN_HEIGTH 99
    #define SCREEN_WIDTH 159
#endif

#if TI92_VERSION
    #define SCREEN_HEIGTH 127
    #define SCREEN_WIDTH 239
#endif

/* code */
first_y=SCREEN_HEIGTH/2-24;
/* code */
/* loop */
SetPlane(0);
ScrRectFill(&(SCR_RECT){0,first_y,SCREEN_WIDTH,first_y+16},ScrRect,A_XOR); /* 
errors 1 & 2 are on this line */
SetPlane(1);
ScrRectFill(&(SCR_RECT){0,first_y,SCREEN_WIDTH,first_y+16},ScrRect,A_XOR); 
/*errors 3 & 4 are on this line */
/* more code */
/* end of loop */
/*end of program */

the problem probably a stupid error, but even when I remove all the variables 
in the *buggy* lines and replace them with constants (like {0,10,159,26}), it 
still throws errors 1 and 3. thanks for any help anyone can give me.




Follow-Ups: