flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
First argument is (test_a and the second is <"1"> - preprocessor notices there's something other than comma after the ">" (which ends argument - preprocessors count the occurences of "<" and ">" to determine which one end an argument) and throws an error.
|
|||
![]() |
|
vid
tomasz: how to include "<" into macro arguments?
![]() |
|||
![]() |
|
dead_body
Code: macro test [arg] { common match some<some?,arg \{ display "< included"\} } test (0,<"1">,0) |
|||
![]() |
|
dead_body
;why here is error?
;macro test must receive one argument. Code: macro test [arg] { common arg ;here i want to see: (0,<"1">) } test (0,<"1">) ;How can I tell to fasm, that I want to receive one argument, ;or how can I receive that argument? |
|||
![]() |
|
Tomasz Grysztar
"<" at a beginning of parameter has a special meaning to preprocessor, there's no way to come round it.
|
|||
![]() |
|
dead_body
maybe it is time to do a substring fix?
Code: >) substring_fix >,) macro test [arg] ;and here will be normal |
|||
![]() |
|
vid
dead body: i still don't get what you want to do with these things
|
|||
![]() |
|
dead_body
vid wrote: dead body: i still don't get what you want to do with these things i wrote macroses(for about a month ago) that do something like that: Code: change_syntax name_of_function:invoke,name_of_function2:libcall ;and now, you can write something like that: name_of_function(param1,name_of_function2("1"),other_args) ;and macroses change it to: invoke name_of_function,param1,<libcall name_of_function2,"1">,other_args like a small script ![]() now i have some free time, and i want to finish them, but i have a problem listed in my first post. i think substring fix is a good idea, but Tomasz say nothing about this, maybe for him substring fix is not a good idea, and now i am searching for another ways. |
|||
![]() |
|
dead_body
is there news?
|
|||
![]() |
|
Tomasz Grysztar
Since < and > have this special meaning, you may use some other characters for this purpose (since you anyway need to parse this syntax with "match"), the round brackets seem to be quite good choice.
Oh, well you can also escape those characters like: Code: test_macro (test_a,\<"1"\>) but perhaps that's not what you need. |
|||
![]() |
|
vid
topic continues here
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.