SIGforum.com    Main Page  Hop To Forum Categories  The Lounge    Doing Math Code in Adobe
Go
New
Find
Notify
Tools
Reply
  
Doing Math Code in Adobe Login/Join 
Needs a check up
from the neck up
Picture of Timdogg6
posted
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


__________________________
The entire reason for the Second Amendment is not for hunting, it’s not for target shooting … it’s there so that you and I can protect our homes and our children and and our families and our lives. And it’s also there as fundamental check on government tyranny. Sen Ted Cruz
 
Posts: 5201 | Location: Boca Raton, FL The Gunshine State | Registered: July 30, 2002Reply With QuoteReport This Post
Optimistic Cynic
Picture of architect
posted Hide Post
PostScript (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)÷
 
Posts: 6888 | Location: NoVA | Registered: July 22, 2009Reply With QuoteReport This Post
Caribou gorn
Picture of YellowJacket
posted Hide Post
In 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.



I'm gonna vote for the funniest frog with the loudest croak on the highest log.
 
Posts: 10629 | Location: Marietta, GA | Registered: February 10, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

SIGforum.com    Main Page  Hop To Forum Categories  The Lounge    Doing Math Code in Adobe

© SIGforum 2024