flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Conditional defines? |
Author |
|
Azu 19 Aug 2009, 08:03
This doesn't compile.
Please tell me how to fix it.. Code: if foo eq 1 bar = "blah" else if foo eq 2 bar = 1,2,3 else bar = 0 end if foo equ 2 db bar |
|||
19 Aug 2009, 08:03 |
|
shoorick 19 Aug 2009, 09:22
maybe place foo equ 2 before if
|
|||
19 Aug 2009, 09:22 |
|
revolution 19 Aug 2009, 12:43
You can't define symbols later in the source. This doesn't work:
Code: display foo
foo equ 1 Also you can't assign bar = "blah", you will need to use bar equ "blah". This mean that you also have to use match to process the bar equ. Code: foo equ 2 bar equ 0 match foo,1 {bar equ "blah"} match foo,2 {bar equ 1,2,3} db bar |
|||
19 Aug 2009, 12:43 |
|
Azu 19 Aug 2009, 21:20
Thanks, but it doesn't work.
Code: foo equ 2 bar equ 0 match foo,2 {bar equ 1,2,3} match foo,1 {bar equ "blah"} db bar Code: bar equ 0 match foo,2 {bar equ 1,2,3} match foo,1 {bar equ "blah"} db bar Please help.. the method you posted has exactly the same problems as the one I originally posted.. |
|||
19 Aug 2009, 21:20 |
|
LocoDelAssembly 19 Aug 2009, 21:47
Code: foo equ 2 bar equ 'INVALID' match =2,foo {bar equ '1','2','3'} match =1,foo {bar equ "blah"} display bar |
|||
19 Aug 2009, 21:47 |
|
Azu 19 Aug 2009, 21:50
Thank you it works.
|
|||
19 Aug 2009, 21:50 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.