flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Macroinstructions > [fasmg] Why does this not work?

Author
Thread Post new topic Reply to topic
_shura



Joined: 22 May 2015
Posts: 17
[fasmg] Why does this not work?
Ohai,
this

Code:

foo equ bar
a_#foo#_b = '#'
display a_bar_b



fails with

Quote:

Error: symbol 'a_bar_b' is undefined or out of scope.


Is there a way to get it compile,except for

Code:

foo equ bar
match anyfoo
  a_#any#_b = '#'
end match
display a_bar_b



?
Post 12 Aug 2017, 00:02
View user's profile Send private message Visit poster's website Reply with quote
jacobly



Joined: 04 Feb 2016
Posts: 15
The symbolic variable would only be substituted if the entire identifier (a_foo_b in this case) matched the variable name. Parameter variables, however, get replaced first, and match is the simplest way to create one. Another way which would work is:

Code:
foo equ bar
a_bar_b = '#'
match symbolfoo
    a_foo_b equ a_#symbol#_b
end match
display a_foo_b

Post 12 Aug 2017, 05:44
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.