[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

EXAMPLES of POKE Statement:
   POKE 1024, 1         (Puts an "A" at position 1 on the screen)
   POKE 2040, PTR       (Updates Sprite #0 data pointer)
   10 POKE RED,32
   20 POKE 36879,8
   2050 POKE A,B


TYPE: Integer Function
FORMAT: POS (<dummy>)

Action: Tells you the current cursor position which, of course, is in the range of 0 (leftmost character) though position 79 on an 80-character logical screen line. Since the Commodore 64 has a 40-column screen, any position from 40 through 79 will refer to the second screen line. The dummy argument is ignored.

EXAMPLE of POS Function:
   1000 IF POS(0)>38 THEN PRINT CHR$(13)


TYPE: Statement
FORMAT: PRINT [<variable>][<,/;><variable>]...

Action: The PRINT statement is normally used to write data items to the screen. However, the CMD statement may be used to re-direct that output to any other device in the system. The <variable(s)> in the output-list are expressions of any type. If no output-list is present, a blank line is printed. The position of each printed item is determined by the punctuation used to separate items in the output-list.

The punctuation characters that you can use are blanks, commas, or semicolons. The 80-character logical screen line is divided into 8 print zones of 10 spaces each. In the list of expressions, a comma causes the next value to be printed at the beginning of the next zone. A semicolon causes the next value to be printed immediately following the previous value. However, there are two exceptions to this rule:

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated November 14, 1998.