UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

PERFORM PERFORM is a synonym for the EXECUTE command. For more information, see EXECUTE. Synonym EXECUTE 1-569 UniBasic Commands Reference

PRECISION Syntax PRECISION num.expr Description The UniBasic PRECISION command rounds numbers to the number of decimal places indicated in num.expr. num.expr can be a number from 0 to 14. If the number is not within this range, UniData does not change the setting. The default is four decimal places. Tip: UniData converts the operands in numeric operations from string to numeric data type, performs the operations, and then converts the results back to string data type. When making calculations for which you require a high degree of precision, use the PRECISION command to force UniData to represent a particular level of decimal representation. Set the UniData FLOAT.PRECISION to 4 to truncate rather than round at the PRECISION setting. Examples In the following example, the program statement results in all numeric variables being truncated to eight decimal places: PRECISION 8 In the next example, the program statement truncates all digits to the right of the decimal point: PRECISION 0 In the next example, the program statement sets precision based on the variable DEC: PRECISION DEC PRECISION 1-570

PERFORM<br />

PERFORM is a synonym for the EXECUTE command. For more information, see<br />

EXECUTE.<br />

Synonym<br />

EXECUTE<br />

1-569 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!