FutureBasic Logo

<<    Index    >> FutureBasic

string$ & string$$   function

stringOfChars$ = string$( numChars, { char$ | asciiValue } )
container$$ = string$$( numChars, { char$ | asciiValue } )

This function returns a string or a container consisting of numChars repetitions of a single character. If you specify a string (char$) in the second parameter, the first character of char$ is repeated. If you specify a number (asciiValue) in the second parameter, string$ repeats the character whose ASCII value is asciiValue. numChars must be in the range 0 through 255; if numChars equals zero, string$returns an empty (zero-length) string.

print string$( 12, "log" )
print string$( 9, 70 )

program output:

See also
space; asc; chr$; BlockFill; Appendix F - The ASCII Character Codes