Page 1 of 1

[Implemented] Macro call count

Posted: Sun Mar 12, 2006 12:52 am
by technicorn
It would be nice to have a name that would be replaced by the number
of times a macro is used:

Code: Select all

Macro TestIt(x,y)
  MOV eax,x
  CMP eax,y
  JE l_ok#MacroCallCount
  CALL ErrorRoutine
ok#MacroCallCount:
EndMacro
Would become:
First time TestIt(vara,123) ->

Code: Select all

  MOV eax,vara
  CMP eax,123
  JE l_ok1
  CALL ErrorRoutine
ok1:
Second time: TestIt(varb,456) ->

Code: Select all

  MOV eax,varb
  CMP eax,456
  JE l_ok2
  CALL ErrorRoutine
ok2:
MacroCallCount shouldn't be a PB constant, because it couldn't be
pasted with #

Of course it should be a counter that is privat to each macro.

Posted: Sun Mar 12, 2006 1:03 pm
by Nik
Good Idea but I wouldn't call it macrocallcount as macrso are simply not called, but maybe #MacroUseNumber