bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
SPC Function Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
SPC skips a specified number of spaces in a PRINT, LPRINT, or
PRINT # statement.
 
SPC(n%)
 
Usage Notes
    ■ Note that the SPC function does more than move the text cursor
      to a new print position. For screen output it also overwrites
      any existing characters on a display screen with blanks.
    ■ The n% blank characters are printed starting at the current
      print position.
    ■ The leftmost print position on an output line is always 1; to have
      any effect, the value of n% must be >= 1.
    ■ The rightmost print position is the current line width of the
      output device (which can be set with the WIDTH statement).
    ■ The behavior of a SPC function depends on the relationship between
      three values: n%, the output-line print position when the SPC
      function is executed, and the current output-line width:
        - If n% is greater than the output-line width, then SPC
          calculates
              (n% MOD width)
          and lays down that many blanks, starting at the current
          print position.
        - If the difference between the current print position and the
          output-line width is less than n% (or n% MOD width),
          then the SPC function skips to the beginning of the next line
          and lays down
                (n% - (width - current print position))
            blanks.