Short-Circuit Evaluation of Boolean Expressions

W

webposter

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
 
C

Christopher Benson-Manica

webposter said:
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
 
P

Peter Shaggy Haywood

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!
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"?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top