SPC

From QB64 Wiki
Revision as of 17:35, 11 March 2010 by imported>Stylin (updated to new blueprint, modified according to discussion at http://www.qb64.net/forum/index.php?topic=801.0)
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