flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > 'rept' bug? |
Author |
|
quiveror 29 Dec 2006, 08:20
Code: macro foo { rept 4 n:0 \{ P#n equ 'hello' \} } foo display P0,13,10 Should the above code print 'hello'? I got an error |
|||
29 Dec 2006, 08:20 |
|
Tomasz Grysztar 29 Dec 2006, 10:51
You forgot to escape the # operator. "P#n" becomes "Pn", while "P\#n" will do what you wanted.
|
|||
29 Dec 2006, 10:51 |
|
quiveror 29 Dec 2006, 17:24
My bad, hehe
|
|||
29 Dec 2006, 17:24 |
|
revolution 01 Mar 2008, 11:26
I think this:
Code: rept 7 x { img#x FILE 'img'#`x#'.ico':22 } |
|||
01 Mar 2008, 11:26 |
|
Picnic 01 Mar 2008, 13:05
Yes it's working fine.
Now inside a macro how to use \ ? Code: macro ImgData { rept 7 x \{ img\#x FILE 'img'#`x#'.ico':22 ; error \} } p.s thanks revolution Last edited by Picnic on 01 Mar 2008, 13:25; edited 1 time in total |
|||
01 Mar 2008, 13:05 |
|
revolution 01 Mar 2008, 13:23
Just escape all the operators # and `.
Code: macro ImgData { rept 7 x \{ img\#x FILE 'img'\#\`x\#'.ico':22 ; error \} } |
|||
01 Mar 2008, 13:23 |
|
Picnic 01 Mar 2008, 14:15
oh, i see now revolution, thanks for your time
|
|||
01 Mar 2008, 14:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.