intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l 4.21 DESCRIPTION OF STATEMENTS CR The CR function is interesting and unique to MCS BASIC-52. When CR is used in a PRINT statement it will force a carriage return, but no line feed. This can be used to create one line on a CRT device that is repeatedly updated. EXAMPLE: >10 FOR I=1 TO 1000 >20 PRINT I,CR, >30 NEXT I will cause the output to remain only on one line. No line feed will ever be sent to the console device. USING(special characters) The USING function is used to tell MCS BASIC-52 what format to display the values that are printed. MCS BASIC-52 "stores" the desired format after the USING statement is executed.

So, all outputs following a USING statement will be in the format evoked by the last USING statement executed. The USING statement need not be executed within every PRINT statement unless the programmer wants to change the format. U. is a "shorthand" notation for USING. The options for USING are as follows: USING(Fx) -- This will force MCS BASIC-52 to output all numbers using the floating point format. The value of x determines how many significant digits will be printed. If x equals 0. MCS BASIC-52 will not output any trailing zeros, so the number of digits will vary depending upon the number. MCS BASIC-52 will always output at least 3 significant digits even if x is 1 or 2.

The maximum value for x is 8. EXAMPLE: >10 PRINT USING(F3),1,2,3 >20 PRINT USING(F4),1.2,3 >30 PRINT USING(F5),1,2,3 >40 FOR I=10 TO 40 STEP 10 >50 PRINT I >60 NEXT I >RUN 1.00 E 0 2.00 E 0 3.00 E 0 1.000 E 0 2.000 E 0 3.000 E 0 1.0000 E 0 2.0000 E 0 3.0000 E 0 1.0000 E+1 2.0000 E+1 3.0000 E+1 4.0000 E+1 READY - 55 -