STRING$¶
Function¶
STRING$ returns a string of a given length composed of similar characters.
Syntax¶
A$ = STRING$(X,Y)
or
A$ = STRING$(X,Y$)
The first version will return the string A$ with X characters of ASCII code Y. The second version returns with a string of the first character of Y$.
Examples¶
100 PRINT"PAGE HEADING"
110 PRINT STRING$(12,"-")
Will output:
PAGE HEADING
------------
Remarks¶
The following statements are equivalent:
A$ = STRING$ (5,65)
B$ = STRING$ (5,"A")
producing a string of five A ’s in A$ and B$ respectively.