PRINT Precision in Advanced Revelation 2.0

Published ByDateVersionKnowledge LevelKeywords
Revelation Technologies10 OCT 19902.XNOVICEPRINT, OCONV

Advanced Revelation for DOS supports floating point numbers with up to 18 decimal digits (18 digits after the decimal). Version 2.0 was enhanced to give you more control in displaying floating point numbers using the PRINT command. This technical bulletin explains the differences in the PRINT command between version 1.X and 2.0.

Prior to version 2.0, the PRINT command displayed only four places to the right of the decimal. This statement:

PRINT 1/3

would display: .3333 under all circumstances. There were no options.

With version 2.0, you decide how many decimal digits to display by including an OCONV with a PRINT command. Unless you specify an OCONV, PRINT displays up to the full 18 decimal digits. This statement:

PRINT 1/3

now displays: .333333333333333333

To limit display to 4 digits, use the following statement:

PRINT OCONV(1/3, "MD40")

which displays: .3333

Indicate one to nine decimal digits using MD1 to MD9, and ten to 18 decimal digits using A to I:

ConversionDecimal digits
MDA10
MDB11
MDC12
MDD13
MDE14
MDF15
MDG16
MDH17
MDI18

MD0 gives you neither decimal digits nor a decimal.

  • tips/revmedia/r67.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1