Re: Why doesn't elseif work?

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Tue, 17 Jun 2003 13:38:24 +1200 (06/17/03 11:38:24)
, Ray Tomes <rtomes at ihug.co.nz> wrote:

>
>
> G'day
>
> The if statement says you can use elseif and gives the following example:
>
> if char = 'a' then
> x = 1
> elsif char = 'b' or char = 'B' then
> x = 2
> elsif char = 'c' then
> x = 3
> else
> x = -1
> end if
>
> However when I use elseif it says "elseif" hasn't been declared.
> "if" doesn't say it needs any includes, so what gives?
>

Just a simple spelling mistake. The word to use is "elsif" and not 
"elseif".



-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu