Amos Professional Manual  Contents  Index

Text


This Chapter explains how to use the advantages of AMOS Professional for handling written text. You may want to remind yourself of the visible character set by running this simple routine:

E> For 0=32 To 255
    Print Chr$(C);" =Ascii Code";
    Print Asc(Chr$(C)) : Wait 10
   Next C

Printing on the screen
The PRINT instruction is one of the most familiar command words in most Basic languages.

PRINT
instruction: print items on screen
Print items

Items are printed on the screen, starting from the current cursor position, and they may include the characters in any group of variables or constants, up to the maximum line length of 255 characters. The PRINT command is also used to display graphics and information on screen, as is demonstrated throughout this User Guide. This Chapter will deal with printing text only.

Print statements can occupy their own lines, but if more than one element to be printed is written as a single line of your program, each element must be separated from the next by either a semi-colon character or a comma. An element to be printed can be a string, a variable or a constant, and is placed inside a pair of quotation marks.

A semi-colon is used to print elements immediately after one another, like this:

E> Print "Follow";"on"

A comma moves the cursor to the next "Tab" position on the screen, as follows:

E> Print "Next","Tab"

A Tab is an automatic marker that sets up a location for printing, and is often used to lay out columns of figures, or to make indentations in text, and setting Tab positions is explained later.

Normally, the cursor is advanced downwards by one line after every PRINT command, but by using the semi-colon or comma, the rule can be changed. Here is an example:

E> Print "AMOS"
   Print "Professional"
   Print "AM";
   Print "OS",
   Print "Professional"
Back    Next
05.06.01