|
Posted by Michael B. Trausch on 07/09/05 02:06
Wayne wrote:
> On Fri, 08 Jul 2005 13:10:45 -0400, "Michael B. Trausch"
> <fdZEROman+spam@gmail.nospam.com> wrote:
>
>
>>The idea is that when something calls userId(), it should get to see
>>what type of user flags that are supported. Now I've moved things
>>around, and it seems like the only if that ever executes is the first
>>one, the code doesn't ever reach any of the elseif blocks.
>
> Umm yes, that's the point of *elseif*. If the first block executes,
> the other ones won't. Replace all your elseif's with regular if's and
> your code will work as indended!
>
It's supposed to stop at the first one that is true, by design, which is
why ELSEIF was used. Apparently another portion of the code is feeding
garbage to this function, however, and this function is working as
designed. I didn't think to unit-test the function *seperate* from the
rest of the code, it just seemed by all indicators that this was the
code that was failing.
That's what I get for trying to code with little sleep. Whoops.
- Mike
[Back to original message]
|