Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Plugins

#define plugin

A community discussion post from the original code:zIRON forum.

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

also i tried this but no luck.

  if( tok == zirDirective) 

http://www.freewebs.com/ogremagic/index.htm

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

oh sorry my mistake, zirDirective works well.

thanks.

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

good to hear, look forward to seeing your update :)

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok , i think there is a bug in inline function.

here is my define code

  #define Absi(x)   eax=x; cdq; xor eax,edx;   eax-=edx;   

this macro return the abslute value.

it converted to this by define handler

inline function Absi(x){eax =  $x ; cdq ; xor eax , edx ; eax -= edx ; $return eax }

the problem is here , when put this code it complied ok

  print( Absi(100)  , '\r\n'); 

and this refused to compile

  print( Absi(-100)  , '\r\n'); 

and give this error

[55,18]: Expected , or ) but found 100 in [test_def.zir] Code: print( Absi(-100) , '\r\n');

http://www.freewebs.com/ogremagic/index.htm