Download Commodore News
Transcript
plus MID$(STR$(FNB(X)),3,3) - extracts the decimal portion of X along with the decimal point. The last subscript in the MID$ controls the precision of your output. Example: 2 3 4 plus rounds to the nearest .1 rounds to the nearest .01 rounds to the nearest .001 LEFT $ (STR$(X),1) - the sign of X (positive or negative). A space is printed for a positive X and a negative sign (-) for a nega tive X. In this particular program the sign is printed to the right of each number. This aligns the signs to be printed in the same column. The format to be used is only a matter of preference. This can easily be changed by rearranging and modifying the strings in line 600. 605 Returns control of the program back to line 100 (in this case). 24