Page 1 of 1

PostPosted: Sat Apr 12, 2003 9:52 am
by joh.becker
Hi,

I tried to use macro for a small function to make it faster. But I can't use variables, just get a error message saying "expression required". If I use a constant it works fine.

Is a variable not possible or am I doing something wrong?

#define ala_write_abs(offset,val) {fileseek(aladinhandle,offset,0); writebyte(aladinhandle, val);}

Johannes

PostPosted: Sun Apr 13, 2003 11:53 am
by guy
Don't put braces around the macro expansion.

#define ala_write_abs(offset,val) fileseek(aladinhandle,offset,0); writebyte(aladinhandle, val)

Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum