News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Infix - Postfix

Started by minor28, October 26, 2013, 03:34:43 AM

Previous topic - Next topic

minor28

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.

dedndave

interesting   :t

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

StringVar$
SingleVar!
DoubleVar#
IntegerVar%

jj2007

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 ***

Vortex

Hi minor28,

Jochen is right. I get the same error messages.

minor28

Sorry,
I removed an argument for number of vararg arguments of the CalcPostfix function. Forgot to change the prototype.

Vortex

Hi minor28,

Thanks for the new upload. I can build the project.

qWord

I get a error-MessageBox for expressions like: "1+1" or "1.0+1.0"...

qWord
MREAL macros - when you need floating point arithmetic while assembling!

minor28

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