flat assembler
Message board for the users of flat assembler.
Index
> Main > error: symbol 'size?0' out of scope |
Author |
|
revolution 12 Jul 2015, 12:41
For a single variable declaration you can forward reference it.
For multiple variable declarations you can only post-reference them. BTW this is not a macro thing. It is the same when used outside of macros also. |
|||
12 Jul 2015, 12:41 |
|
jiangfasm 12 Jul 2015, 13:41
revolution wrote: For a single variable declaration you can forward reference it. ;tst.asm if size display 'size ' end if size = 1 size = 2 ;<---- here if size display 'size ' end if db 9,9,9 $ fasm hello.asm flat assembler version 1.71.39 (1048576 kilobytes memory) size hello.asm [3]: if size error: symbol 'size' out of scope. You are very right! Well I suggest improvements to macros FASM.and always feel with illogical places. thank revolution! |
|||
12 Jul 2015, 13:41 |
|
jiangfasm 12 Jul 2015, 13:47
$ fasm hello.asm
flat assembler version 1.71.39 (1048576 kilobytes memory) size hello.asm [3]: if size error: symbol 'size' out of scope. I say is improved if statement problem. |
|||
12 Jul 2015, 13:47 |
|
jiangfasm 12 Jul 2015, 13:57
You are very right! But I suggest improving FASM, and always feel is unreasonable.
|
|||
12 Jul 2015, 13:57 |
|
revolution 12 Jul 2015, 14:31
What is your suggestion for the new message?
|
|||
12 Jul 2015, 14:31 |
|
jiangfasm 12 Jul 2015, 14:49
1. improving the if statement, the following compile:
if size display 'size ' end if size = 1 size = 2 ;<---- always feel is unreasonable if size display 'size ' end if db 9,9,9 2. Add a new warning, put the following into other, easy to understand meaning. error: symbol 'size' out of scope. have something new in mind, I have news to tell you. |
|||
12 Jul 2015, 14:49 |
|
revolution 12 Jul 2015, 15:23
This is not an issue with "if". It affects anything that uses the variable before it is defined.
Code: display size ;<--- okay size = '0' Code: display size ;<--- what value to display? size = '0' size = '1' ;<--- redefined |
|||
12 Jul 2015, 15:23 |
|
jiangfasm 12 Jul 2015, 21:48
hank you revolution! I use FASM levels but also improve some!
display size ;<--- what value to display? size = '0' size = '1' ;<--- redefined $ fasm hello.asm flat assembler version 1.71.39 (1048576 kilobytes memory) hello.asm [1]: display size ;<--- what value to display? error: symbol 'size' out of scope. thank you so much for your help! |
|||
12 Jul 2015, 21:48 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.