Explanation
STRING$ Function
Returns a string of a specified length made up of a repeating character.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
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$. |
PRINT STRING$(5, "-");
PRINT "Hello";
PRINT STRING$(5, "-")
See also: | ASCII Code Tables |