qbasic.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.
STRING$ Function
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns a string of a specified length made up of a repeating character.
 
STRING$(length%,{ascii-code% | stringexpression$})
 
    ■ length%              The length of the string.
    ■ ascii-code%          The ASCII code of the repeating character.
    ■ stringexpression$    Any string expression. STRING$ fills the string
                           with the first character in stringexpression$.
 
Example:
    PRINT STRING$(5, "-");
    PRINT "Hello";
    PRINT STRING$(5, "-")
 
See Also    ASCII Character Codes