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.
elseif
Hi,
Yes this would be nice :
This is a bit like select case instruction
but "select case statement" allows only simple statement.
"If then elseif" accepts some more complicated statement like : if a<5 and b>5 then
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
Code: Select all
Select case Temp
case statement1
xxxx
case statement 2
yyyyy
case statement3
zzzzz
case statement4
aaaa
case else
bbbbb
end select
"If then elseif" accepts some more complicated statement like : if a<5 and b>5 then
Alain
After 4 year, nothing change
Hi to all, it seems to me the keyword elseif
does not exist. I would appreciate to have it.
does not exist. I would appreciate to have it.
- mileta.miletic
- mikroElektronika team
- Posts: 493
- Joined: 05 Jun 2009 14:46
- Location: Belgrade, Serbia
- Contact:
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
Regards,
Mileta
Mileta