Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

PRECISION

Description

The PRECISION statement informs jBASE as to the number of digits of precision it uses after the decimal point in numbers. It takes the general form: 

PRECISION integer

Where integer should be in the range 0 to 9.

Note:

  • A PRECISION statement can be specified any number of times in a source file. Only the most recently defined precision will be active at any one time.
  • Calling programs and external subroutines do not have to be compiled at the same degree of precision, however, any changes to precision in a subroutine will not persist when control returns to the calling program.
  • jBASE uses the maximum degree of precision allowed on the host machine in all mathematical calculations to ensure maximum accuracy. It then uses the defined precision to format the number.

An example of use may be: 

PRECISION 6
CRT 2/3

to print:

0.666666 ****(note: truncation not rounding!).


Go back to jBASE BASIC.

Was this article helpful?