Thanks guys.  One of those days where you stare at something for a while,
and on't realize the obvious :(

On Fri, Aug 5, 2011 at 11:12 AM, Marc Harbeson <marc.harbe...@gmail.com>wrote:

> This is the reason you always place CASE 1 at the end...  :-)
>
> -----Original Message-----
> From: u2-users-boun...@listserver.u2ug.org
> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Glenn Sallis
> Sent: Friday, August 05, 2011 11:00 AM
> To: U2 Users List
> Subject: Re: [U2] Strange CASE Statement behavior
>
> Hi John
>
> Based on the values of your variables, your CASE construct is behaving
> perfectly!
>
> As far as I can tell, the reason partial_names_found never executes is
> because the preceding clause in your CASE statement evaluates to /true/.
> In a CASE block, each clause is checked until a clause is found which
> evaluates to /true. /The preceding conditions in the CASE are not checked.
>
> If you really do need to know the results of all conditions, you may be
> better of with using multiple IF clauses.
>
> Regards
>
> */Glenn Sallis
> /**Glenn Sallis Softwareentwicklung und Beratung
> *47608 Geldern·Deutschland
> Tel: + 49 2831 9104220 Mob: +49 151 55714743·
> Email:_gl...@glennsallis.de <mailto:gl...@glennsallis.de>___
> Web: www.glennsallis.de <http://www.glennsallis.de/>
>
> /Ihr "Zuhause" für unabhängige MultiValue Beratung in Deutschland und
> Benelux/
>
>
>
> Am 05.08.2011 16:57, schrieb John Thompson:
> > I'm running on Universe 10.3.4 on AIX 5.3 on a PICK flavor account.
> >
> > I ran into some really weird behavior with a CASE statement this morning,
> or
> > at least what I deem to be strange.
> >
> > I won't post the entire program... yet....
> >
> > Basically I have some boolean variables that get set earlier in the
> program
> > to the following values.
> >
> > exact_alpha1_found    = @FALSE
> > partial_alpha1s_found = @TRUE
> > partial_names_found   = @TRUE
> >
> > Then the CASE statement does its checks...
> >
> > BEGIN CASE
> > CASE exact_alpha1_found
> > ...do something...
> > CASE (partial_alpha1s_found AND partial_names_found)
> > ...do something...
> > CASE partial_names_found
> > ...do something...
> > END CASE
> >
> > However, the CASE partial_names_found never executes.  It fails!!!
> >
> > Is it only allowed to check these once, and thats it?
> >
> > In the debugger the value of partial_names_found is still a 1, even after
> > the check fails.
> >
>
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>
> _______________________________________________
> U2-Users mailing list
> U2-Users@listserver.u2ug.org
> http://listserver.u2ug.org/mailman/listinfo/u2-users
>



-- 
John Thompson
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to