SPC

From QB64 Wiki
Revision as of 14:57, 14 November 2010 by imported>Clippy
Jump to navigation Jump to search

The SPC function is used in PRINT and PRINT # statements to print or output a number of space characters.


Syntax

SPC(n%)


Description

  • When used in a PRINT statement,
    • n% is the number of space characters to print, overwriting existing characters.
    • If n% is greater than the number of columns left in the current row, the remaining space characters are printed on the next row at column 1.
  • When used in a PRINT # statement,
    • n% is the number of space characters to output.
  • If n% is less than or equal to zero, the function has no effect.


Examples

PRINT "123456789" PRINT "abc" ; SPC(3) ; "123"

123456789 abc 123


See also



Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page