Home Page


BASIC Handbook

Basic2 Commands
Disk Drives
PEEK's and POKE's
RAM Memory Map
ROM Memory Map
Screen Display
Sprite
ASCII and CHR$ Codes

eMail
email5-commodorecheetah.co.uk

Note: You will need to replace the '-' with the @ symbol.
This is to minimize spam.

My BASIC Quick Reference Guide

SPC()
Abbreviation: S <SHIFT+P>

TYPE: String Function
FORMAT: SPC (<numeric>)

Action: The SPC function is used to control the formatting of data, as either an output to the screen or into a logical file. The number of SPaCes given by the <numeric> argument are printed, starting at the first available position. For screen or tape files the value of the argument is in the range of 0 to 255 and for disk files up to 254. For printer files, an automatic carriage-return and line-feed will be performed by the printer if a SPaCe is printed in the last character position of a line. No SPaCes are printed on the following line.


EXAMPLE of SPC Function:

10 PRINT"RIGHT "; "HERE &";
20 PRINT SPC(5)"OVER" SPC(14)"THERE"
RUN

RIGHT HERE &-----OVER--------------THERE (- = Space)


Commodore Cheetah made by Allen Monks, started in the year 2000.