Amos Professional Manual  Contents  Index

Text


Setting text options

PEN
instruction: set the colour of text
Pen index number

This command sets the colour of the text displayed in the current window, when followed by the colour index number of your choice. The default setting of the pen colour is index number 2, which is white, and alternative colours may be selected from one of up to 64 choices, depending on the current graphics mode. For example:

E> For INDEX=0 To 15
    Pen INDEX
    Print "Pen number ";INDEX
   Next INDEX

PEN$
function: return a control index number to set the pen colour
p$=Pen$(index number)

This function returns a special control sequence that changes the pen colour inside a string. This means that whenever the string is printed on the screen, the pre-set pen colour is automatically assigned to it. The format of the string returned by PEN$ is: Chr$(27)+"Pen"+Chr$(48+number). Here is an example:

E> P$=Pen$(2)+"Well all WHITE, "+Pen$(6)+" I still got the BLUES"
   Print P$
   Pen 4
   Print "In the RED"

PAPER
instruction: set colour of text background
Paper index number

To select a background colour on which your text is to be printed, the PAPER command is followed by a colour index number between 0 and 63, depending on the graphics mode in use, in exactly the same way as PEN. The normal default colour index number is 1, giving an orange background colour, with other possibilities listed under the SCREEN OPEN command in this User Guide. Run the following simple example:

E> Pen 2: For INDEX=0 To 15
   Paper INDEX: Print "Paper number ";INDEX;Space$(23)
   Next INDEX
Back    Next
05.06.02