Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 06 OCT 2005 11:27:50AM Marc Edwards wrote:

Question with data type in OI

Data type Field1 (quantity) is Decimal, Conversion display is MD2,$

Data type Field2 (price) is Decimal, Conversion display is MD0

It does not work for ans=field1*field2, any advise?

Thanks.


At 06 OCT 2005 04:45PM R Johler wrote:

What do you mean by "not work"?

If price is $5.15 and quantity is 10, is the ans=price*quantity

resulting in 5,150?

If so then the fix in r/basic is to divide by 100 like this

 ans=price*quantity/100

OI (and Arev) store that price as 515, the "MD2" causes the output to be displayed as 5.15 so when you do the math in r/basic you have to do the md2 conversion yourself.

Or is there some other problem?


At 06 OCT 2005 07:22PM Leon Shaffer wrote:

Personally I like to use

@ans=iconv(oconv(field1,'MD2') * OCONV(FIELD2,'MD0'),'MD2')

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b72cc4007a78f419852570920054f24c.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1