Please enable JavaScript to view this site.

Testing Project 3

Navigation: Subroutines > MIAMEX

SIGNIFICANCE

Scroll Prev Top Next More

Reproduced from the AphaBASIC User's Manual, Revision 05 of April 1999

The format is:

 

SIGNIFICANCE value

 

The significance statement allows you to dynamically change the default value of the numeric significance of the program for unformatted printing.

 

The significance value can be any value from 1 through 11 and represents the maximum number of digits to be printed in unformatted numbers. Rounding off to the specific number of digits is not performed until just before the printing of the result.

 

The statement SIGNIFICANCE 8, for instance, sets the number of printable digits to 8. The value is interpreted at run-time and therefore may be any valid numeric expression, including variables. The current significance is ignored when PRINT USING is in effect.

 

Note that the SIGNIFICANCE statement only affects the final printed result of all numeric calculations. The calculations themselves and the storage of intermediate results are always performed in full 11-digit precision to reduce the number of errors.

 

The significance default is 6 digits.  This is equivalent to standard single-precision formats used in most of the popular versions of BASIC. The significance is not reset by the RUN command and therefore may be set in interactive mode in a direct statement just prior to the actual running of a test program. Of course, any SIGNIFICANCE statements encountered during the execution of the program reset the value.

 

 

 

above is as imported straight from original manual, below is reformatted per our usual styles

 

 

 

Reproduced from the AphaBASIC User's Manual, Revision 05 of April 1999

The format is:

SIGNIFICANCE value

The significance statement allows you to dynamically change the default value of the numeric significance of the program for unformatted printing.

The significance value can be any value from 1 through 11 and represents the maximum number of digits to be printed in unformatted numbers. Rounding off to the specific number of digits is not performed until just before the printing of the result.

The statement SIGNIFICANCE 8, for instance, sets the number of printable digits to 8. The value is interpreted at run-time and therefore may be any valid numeric expression, including variables. The current significance is ignored when PRINT USING is in effect.

Note that the SIGNIFICANCE statement only affects the final printed result of all numeric calculations. The calculations themselves and the storage of intermediate results are always performed in full 11-digit precision to reduce the number of errors.

The significance default is 6 digits.  This is equivalent to standard single-precision formats used in most of the popular versions of BASIC. The significance is not reset by the RUN command and therefore may be set in interactive mode in a direct statement just prior to the actual running of a test program. Of course, any SIGNIFICANCE statements encountered during the execution of the program reset the value.