flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > elif and else if

Author
Thread Post new topic Reply to topic
uri



Joined: 09 Apr 2004
Posts: 44
Location: L'viv, Ukraine
uri
Why this works:
Code:
pragma = 3

if      pragma = 2
        display '2',13,10
else if pragma = 3
        display '3',13,10
end if
    


but this not works:
Code:
pragma = 3

if      pragma = 2
        display '2',13,10
elif    pragma = 3
        display '3',13,10
end if
    


It's a bug, or I must reread manual?
Thank you.
Post 12 Sep 2005, 09:08
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7487
Location: Kraków, Poland
Tomasz Grysztar
"elif" is not a built-in keyword in fasm. Perhaps "elif equ else if" definition would help?
Post 12 Sep 2005, 09:15
View user's profile Send private message Visit poster's website Reply with quote
uri



Joined: 09 Apr 2004
Posts: 44
Location: L'viv, Ukraine
uri
Yes, i actually use fix.

But why using 'elif' do not show error?
Why code with 'not a built-in keyword' successfuly compiles?
Post 12 Sep 2005, 09:49
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
uri



Joined: 09 Apr 2004
Posts: 44
Location: L'viv, Ukraine
uri
I see.
In this case all in the if block (until to end if) are false and do not analyse.
thank you.
Post 12 Sep 2005, 09:51
View user's profile Send private message Visit poster's website ICQ Number 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


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.