Re: Formatting a string for proper calculation
From: David Frankenbach (sendnospam_at_sendnospam.net)
Date: 09/05/04
- Next message: David Frankenbach: "Re: Treeview Question"
- Previous message: Chris K.: "Re: Formatting Excel cel out of VFP6"
- In reply to: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Next in thread: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Reply: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 5 Sep 2004 12:15:00 -0500
Edhy,
Go to the FoxProWiki topic
http://fox.wikis.com/wc.dll?Wiki~WikiAdvancedSearch and download the zip
file I posted there.
The code in there takes algebraic logical expressions (InFix notation) and
converts them to RPN (PostFix notation). You should be able to convert the
operators handled: and or not () to * / + - (). * / should be handled like
AND, + - should be handled like OR. A unary minus like -x should be handled
like NOT.
The code in the WikiSearch method that evaluates the RPN is a lot more
complex than what you'll need to use because it's using SQL statements.
Yours can be a simple + - / * of the two operands on the stack.
-- df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message news:Ol3KTR2kEHA.3648@TK2MSFTNGP09.phx.gbl... > I am checking information about RPN, I think it really does apply to my > situation. Do you know of any library or ActiveX that would help me get > the results in RPN?
- Next message: David Frankenbach: "Re: Treeview Question"
- Previous message: Chris K.: "Re: Formatting Excel cel out of VFP6"
- In reply to: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Next in thread: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Reply: Edhy Rijo: "Re: Formatting a string for proper calculation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|