Code:
typedef struct token
{
int tokenType; // what token is that
int tokenCode; // the code of a function if applicable
char *tokenString; // Source token
double tokenValue; // if token is a number
} TToken;
TToken *tokenTab[] = {TK_COMMAND, 001, "PRINT", 0.0,
TK_NUMFUNC, 100, "SIN", 0.0,
TK_NUMFUNC, 101, "COS", 0.0,
TK_NUMFUNC, 102, "TAN", 0.0,
TK_NUMFUNC, 103, "CDBL",0.0,
TK_NUMFUNC, 104, "LEN", 0.0,
TK_STRFUNC, 200, "LEFT", 0.0,
TK_STRFUNC, 200, "MID", 0.0,
TK_STRFUNC, 200, "RIGHT",0.0,
0, 0, NULL, 0.0};
Errors:
I got several warnings and erros, is it possible to declare a table like that ? What's the correct way to declare it ?
Thanks in advance!