flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > How check last macro param ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1772
Roman 18 Sep 2022, 10:38
Fasmw 1.73
Code:
;in one place code
eqIrp EQU macroA,Data,0
eqIrp EQU macroA,Data2,2 ;last param its 2

;another place code
irpv v,eqIrp { v
if last param = 2
invoke MessageBox,0,'commited',0,0
end if
 } 
    


I want in irpv check last param from eqIrp.
How do this
Post 18 Sep 2022, 10:38
View user's profile Send private message Reply with quote
macomics



Joined: 26 Jan 2021
Posts: 928
Location: Russia
macomics 18 Sep 2022, 11:11
Code:
macro checkIf2 arg { if arg = 2
    invoke MessageBox, 0, 'commited', 0, 0
end if }

macro checkArg check, [args] { common local test1
    define test1
reverse match , test1 \{ check args
    \restore test1 \} }

;in one place code
eqIrp EQU macroA,Data,0
eqIrp EQU macroA,Data2,2 ;last param its 2

;another place code
irpv v,eqIrp { v
checkArg checkIf2, v }    
Post 18 Sep 2022, 11:11
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1772
Roman 18 Sep 2022, 11:35
Thanks. Work fine.
Post 18 Sep 2022, 11:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.