Jump to content

Futurebasic/Language/Reference/stringstr

From Wikibooks, open books for an open world

STRING$ & STRING$$

[edit | edit source]

Syntax

[edit | edit source]

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

Revised

[edit | edit source]

July 27, 2000 (Release 3)

Description

[edit | edit source]

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.

Example

[edit | edit source]
PRINT STRING$(12, "LOG")
PRINT STRING$(9, 70)

program output:
LLLLLLLLLLLL
FFFFFFFFF

See Also

[edit | edit source]

SPACE$; ASC; CHR$; DEF BLOCKFILL; Appendix F: The ASCII Character Codes