The MASM Forum

General => The Campus => Topic started by: minor28 on October 26, 2013, 03:34:43 AM

Title: Infix - Postfix
Post by: minor28 on October 26, 2013, 03:34:43 AM
For those interested,
I've tested to compute common arithmetic and logical formula expresseions with different unknown variables at compile time. The test app (attached exe and source code) has this formula

(5.2 * (2 - 4)/20.0)*10 * $Arg1 * $Arg2 / #Arg3

A prefix $ argument is a dword value and the prefix # is a float value.
Title: Re: Infix - Postfix
Post by: dedndave on October 26, 2013, 04:09:30 AM
interesting   :t

reminds me a little of the old IBM Basic data types   :P

StringVar$
SingleVar!
DoubleVar#
IntegerVar%
Title: Re: Infix - Postfix
Post by: jj2007 on October 26, 2013, 04:42:48 AM
conflicting parameter definition : pArguments
CalcPostfix.asm(1) : error A2111: conflicting parameter definition
CalcPostfix.asm(56) : error A2006: undefined symbol : pArguments
CalcPostfix.asm(64) : error A2006: undefined symbol : pArguments
*** Assembly Error ***
Title: Re: Infix - Postfix
Post by: Vortex on October 26, 2013, 04:54:50 AM
Hi minor28,

Jochen is right. I get the same error messages.
Title: Re: Infix - Postfix
Post by: minor28 on October 26, 2013, 05:07:52 AM
Sorry,
I removed an argument for number of vararg arguments of the CalcPostfix function. Forgot to change the prototype.
Title: Re: Infix - Postfix
Post by: Vortex on October 26, 2013, 05:14:46 AM
Hi minor28,

Thanks for the new upload. I can build the project.
Title: Re: Infix - Postfix
Post by: qWord on October 26, 2013, 03:11:22 PM
I get a error-MessageBox for expressions like: "1+1" or "1.0+1.0"...

qWord
Title: Re: Infix - Postfix
Post by: minor28 on October 26, 2013, 06:07:51 PM
The test program as it is demands three argument. For "1+1" or "1.0+1.0" you must change

invoke CalcPostfix,addr Postfix,addr fValue,addr Arg1,addr Arg2,addr Arg3

to

invoke CalcPostfix,addr Postfix,addr fValue