Difference between revisions of "SPC"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
Line 1: Line 1:
The {{KW|SPC}} function is used in {{KW|PRINT}} and {{KW|PRINT (file statement)|PRINT #}} statements to print or output a number of space characters.
+
The {{KW|SPC}} function is used in [[PRINT]] and [[LPRINT]] statements to print or output a number of space characters.
  
  

Revision as of 18:59, 1 June 2011

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


Syntax

SPC(count%)


Description

  • When used in a PRINT statement,
    • count% is the number of space characters to print, overwriting existing characters.
    • If count% is greater than the number of columns left in the current row, remaining space characters are printed on the next row.
  • When used in a PRINT # statement,
    • count% is the number of space characters to output.
    • If count% 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