Short-Circuit Evaluation of Boolean Expressions

Discussion in 'C Programming' started by webposter, Sep 13, 2004.

  1. webposter

    webposter Guest

    Hi,

    I am looking for information on a data structure (and associated
    algorithm) to do short-circuit evaluation of boolean expressions and
    haven't found a single one even after googing for two days! Can anyone
    point me to good resources (or implementations) that do this.
    Basically is there any way to optimize a boolean expression expressed
    in RPN (reverse polish notation)?

    I want to implement the algorithm/data structure in C. If you have a
    reference implementation can you please point me to it. I am sorry if
    this is off topic for this group. Because I want a C implementaion I
    posted here!

    your help is highly appreciated
    thanks
    Andy
     
    webposter, Sep 13, 2004
    #1
    1. Advertising

  2. webposter <> spoke thus:

    > I am looking for information on a data structure (and associated
    > algorithm) to do short-circuit evaluation of boolean expressions and


    I'm not sure what you're asking, but C by definition uses
    short-circuit evaluation to evaluate boolean expressions, if that
    helps you.

    > I want to implement the algorithm/data structure in C. If you have a
    > reference implementation can you please point me to it. I am sorry if
    > this is off topic for this group. Because I want a C implementaion I
    > posted here!


    We can't help you figure out what the algorithm/data structures you
    want are, but once you get those figured out, we can help you
    implement them.

    http://www.ungerhu.com/jxh/clc.welcome.txt
    http://www.eskimo.com/~scs/C-faq/top.html
    http://benpfaff.org/writings/clc/off-topic.html

    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
     
    Christopher Benson-Manica, Sep 13, 2004
    #2
    1. Advertising

  3. Groovy hepcat Christopher Benson-Manica was jivin' on Mon, 13 Sep 2004
    13:26:54 +0000 (UTC) in comp.lang.c.
    Re: Short-Circuit Evaluation of Boolean Expressions's a cool scene!
    Dig it!

    >webposter <> spoke thus:
    >
    >> I am looking for information on a data structure (and associated
    >> algorithm) to do short-circuit evaluation of boolean expressions and

    >
    >I'm not sure what you're asking, but C by definition uses
    >short-circuit evaluation to evaluate boolean expressions, if that
    >helps you.


    I'm not certain because he's not too clear, but I think he is trying
    to write an expression parser that has short circuit boolean
    operators.

    --

    Dig the even newer still, yet more improved, sig!

    http://alphalink.com.au/~phaywood/
    "Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker.
    I know it's not "technically correct" English; but since when was rock & roll "technically correct"?
     
    Peter Shaggy Haywood, Sep 14, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Jørgensen

    boolean short circuit

    Michael Jørgensen, Sep 22, 2005, in forum: C Programming
    Replies:
    5
    Views:
    343
    Jack Klein
    Sep 23, 2005
  2. Lassie

    short circuit evaluation

    Lassie, Sep 16, 2008, in forum: C Programming
    Replies:
    29
    Views:
    864
  3. Anthony Paul

    short-circuit evaluation and assignment operators

    Anthony Paul, Jun 6, 2009, in forum: C Programming
    Replies:
    5
    Views:
    1,330
  4. mingze zhang
    Replies:
    2
    Views:
    487
    James Kanze
    Jul 15, 2010
  5. mingze zhang
    Replies:
    4
    Views:
    1,156
    aadilsabri
    Oct 22, 2011
Loading...

Share This Page