Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Checking lots of conditions...ORed and ANDed

by baruch (Beadle)
on Jun 08, 2004 at 03:06 UTC ( [id://362199]=note: print w/replies, xml ) Need Help??


in reply to Checking lots of conditions...ORed and ANDed

I hesitate to mention it, but this is an ideal situation for using Boolean algebra to reduce the number of conditions. It sounds terrible, but the rules aren't all that difficult, and it's well worth the effort of learning (assuming you'll be doing much of this sort of complicated work with conditionals).


רוּךבּ
  • Comment on Re: Checking lots of conditions...ORed and ANDed

Replies are listed 'Best First'.
Re^2: Checking lots of conditions...ORed and ANDed
by hardburn (Abbot) on Jun 08, 2004 at 12:37 UTC

    Boolean algebra would simplify the conditions. Polymorphisim could obliviate them all together. I'm not entirely certain how it would apply to this specific information (as I suspect I do not fully understand the OP's problem), but this is generally the case.

    Still, you get a ++ from me for bringing up a concept which is significantly undervalued. Besides, Boolean algebra is fun :)

    ----
    send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.

      as I suspect I do not fully understand the OP's problem

      One picture is a thousand words. Here is the screenshot of the actual system. I have opened one of the menus also. Menus differ with each cell. This should help you understand better what I mean. :)

Re^2: Checking lots of conditions...ORed and ANDed
by tbone1 (Monsignor) on Jun 08, 2004 at 12:30 UTC
    I'll back Baruch on this. It's compact, quick, and fairly flexible.

    Remember, there are times when code has to be complex. The world is complex and sometimes you just have to deal with it.

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://362199]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-16 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found