Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

(CR)

Mnemonic: (CR)
Discussion: Cursor return/carriage return.

This control code can be used on a video device or a printer.

Video device
In normal mode, the (CR) control code moves the cursor to the first foreground position on the following line. If the cursor is on the bottom line when this control code is issued, the cursor will be moved to the top line of the screen. In either case, the cursor will land only in a foreground field.

In typewriter mode, this control code scrolls the screen up one line (forcing the top line off the screen) and will move the cursor to the beginning (left side) of the bottom line on the screen.

Printer
The (CR) control code performs a carriage return function for the printer. If this control is issued in the middle of a print line, it advances the printer to the beginning of the next line (unlike a line feed control, which would skip the next line and move to the beginning of the following line).

Example (video):
a. 100 FORMAT (CR)
   .
   PRINT (0,100)

b. PRINT (0) (CR)
Example (printer):
a. 100 FORMAT "CUSTOMER LISTING";(CR);"PRINTED ON:";DAY$
   .
   OPEN (1) "LP1"
   .
   PRINT (1,100)


b. OPEN (1) "LP1"
   .
   PRINT (1) "CUSTOMER LISTING";(CR);"PRINTED ON:";DAY$
This example prints a heading, performs a carriage return, and then prints a subheading on the next line.