CODE |
ec1 If (tilenumber) != 0 expr("run"&string(tilenumber)&"()") c2 |
QUOTE (Alex @ May 19 2006, 04:36 PM) |
I just found something: http://www.newty.de/fpt/fpt.html In C it would be: void function(void); void function2(void); void (*functions[2])(void) = { NULL }; functions[0] = &function; functions[1] = &function2; ... if(tile > 0) (*functions[tile])(); It should work in TIGCC, perhaps with a little tweaking of the pointer casts. - Alex |
QUOTE (Alex @ May 20 2006, 03:37 AM) |
Yea, there's something about nicely structured, tabbed C code that screams "pure logic!". :)![]() - Alex |
CODE | ||
ec1typedef struct _adel /* Basic element type */ { void *parent; Post by: Liazon on May 20, 2006, 10:58:00 am
What does this line mean? I understand what you're doing with everything else, but what kind of void pointer are you initiating? saubue: )_) Post by: saubue on May 20, 2006, 11:02:00 am |