Page 1 of 1
elseif
Posted: 23 May 2005 12:27
by intothefray
Would love to have an elseif statement.
Would also like to see if or elseif's to use less program memory. I realize there's a major difference but select case statements use MUCH less program memory than if statements.
Posted: 06 Oct 2006 21:10
by Kalain
Hi,
Yes this would be nice :
Code: Select all
if statement1 then
xxxx
elseif statement2 then
yyyyy
elseif statement3 then
zzzzz
elseif statement4 then
aaaa
else
bbbbb
end if
This is a bit like select case instruction
Code: Select all
Select case Temp
case statement1
xxxx
case statement 2
yyyyy
case statement3
zzzzz
case statement4
aaaa
case else
bbbbb
end select
but "select case statement" allows only simple statement.
"If then elseif" accepts some more complicated statement like : if a<5 and b>5 then
After 4 year, nothing change
Posted: 02 Oct 2009 07:56
by MauroB
Hi to all, it seems to me the keyword elseif
does not exist. I would appreciate to have it.
Posted: 02 Oct 2009 15:33
by mileta.miletic
Thanks for suggestion, we will consider this. You can use if then else statement as:
Code: Select all
if statement1 then
PORTA=1
else if statement2 then
PORTB=1
else if statement3 then
PORTC=1
else if statement4 then
PORTD=1
else
PORTD=2
end if
end if
end if
end if