Velocity Reviews > Really simple Question.

# Really simple Question.

Graham Mattingley
Guest
Posts: n/a

 09-04-2003
I think I have lost my brain, or drank too much Redbull, because I cant make
the following work.

....
else
.......
end if

If I do this below, it works.

....
else
.......
end if

How do I this with more than one option, is it with ELSE IF ??

Kind Regards

Graham Mattingley

Tom B
Guest
Posts: n/a

 09-04-2003
You'll never get to your else, because it will always match your expression
Example1: menu_list ="age" --- it doesn't equal "first_name" so it'll do
what's in the if
Example2: menu_list="first_name" --- it doesn't equal "age" so it'll do
what's in the if
Example3: menu_list="BOB" --- it doesn't equal either, so it'll do what's in
the if.

I assume you want to use an AND

'Example 3 would end up here
else
'Example 1 and 2 would end up here
end if

OR

'Example 1 and 2 would end up here
else
'Example 3 would end up here
end if

"Graham Mattingley" <(E-Mail Removed)> wrote in message
news:bj863g\$sc5\$1\$(E-Mail Removed)...
> I think I have lost my brain, or drank too much Redbull, because I cant

make
> the following work.
>
>
> ...
> else
> ......
> end if
>
> If I do this below, it works.
>
> if menu_list <> "age" then
> ...
> else
> ......
> end if
>
> How do I this with more than one option, is it with ELSE IF ??
>
> Kind Regards
>
> Graham Mattingley
>
>
>
>

Graham Mattingley
Guest
Posts: n/a

 09-04-2003
Thanks Tom,

I knew it would be simpleish, think I have been at the screen to long today

it is all working now

Graham Mattingley

"Tom B" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> You'll never get to your else, because it will always match your

expression
> Example1: menu_list ="age" --- it doesn't equal "first_name" so it'll do
> what's in the if
> Example2: menu_list="first_name" --- it doesn't equal "age" so it'll do
> what's in the if
> Example3: menu_list="BOB" --- it doesn't equal either, so it'll do what's

in
> the if.
>
> I assume you want to use an AND
>
> 'Example 3 would end up here
> else
> 'Example 1 and 2 would end up here
> end if
>
>
> OR
>
> 'Example 1 and 2 would end up here
> else
> 'Example 3 would end up here
> end if
>
>
>
> "Graham Mattingley" <(E-Mail Removed)> wrote in message
> news:bj863g\$sc5\$1\$(E-Mail Removed)...
> > I think I have lost my brain, or drank too much Redbull, because I cant

> make
> > the following work.
> >
> >
> > ...
> > else
> > ......
> > end if
> >
> > If I do this below, it works.
> >
> > if menu_list <> "age" then
> > ...
> > else
> > ......
> > end if
> >
> > How do I this with more than one option, is it with ELSE IF ??
> >
> > Kind Regards
> >
> > Graham Mattingley
> >
> >
> >
> >

>
>