October 22, 2024, 01:55 PM
Timdogg6Doing Math Code in Adobe
Totally frustrated, I have searched online and I just dont get the format
I need to add 2 fields together, once added I then multiply the product times .7
This is the best I have come up with and it doesn't work, I tried without spaces as well.
I am using the simplified file notations
(OTRow2 + LProw2) * .7
Can I get some help here? Or tell me where to look.
Thank you!
PS I dont know how to do it in excel either and I am afraid if I do it in excel I will lose the math when I make it a pdf which is the format I really need.
Thanks
October 22, 2024, 03:02 PM
architectPostScript (the basis of PDF) uses postfix notation (operators come after operands). Like an HP RPN calculator.
so try: OTRow2 LProw2 + .7 *
1) push OTRow2 on stack
2) push LProw2 on stack
3) execute add operation (leaving sum of the two on the stack)
4) push .7 on stack
5) execute multiply operation (leaving product on stack)
Of course, this sequence is not appropriate for Excel which uses algebraic notation.
It has been decades since I did any PostScript coding, but ISTR you have to put the variables and constants inside parens in the code itself, e.g. (2 3)+ or ((2 100)*50)รท
October 22, 2024, 03:35 PM
YellowJacketIn Excel, say your two inputs are in cells C8 and C9. The equation you want would be:
=(C8+C9)*.7
You could also put 0.7 in a cell, call it C10, and you would have:
=(C8+C9)*C10
You may just be missing the = sign at the beginning. I don't know what Adobe product you are using.