STRING$()
This page was last modified 19:54, 27 January 2018 by Mars2000you. Based on work by Gdx and NYYRIKKI and others.

Contents

Effect

Returns a string with a variable length, all containing either the same character, which is defined as an ASCII code or the first character of a string.

Syntaxes

  • STRING$(<length>,<ASCII code>)
  • STRING$(<length>,<string>)

Parameters

<length> It is the length of the string and must be an integer in range between 0 and 255.

<ASCII code> must be an ASCII code between 32 and 255.

Example

10 PRINT STRING$(8,65)
20 PRINT STRING$(8,"MSX")
 
RUN
AAAAAAAA
MMMMMMMM

Related to

ASC(), CHR$(), SPACE$(), SPC(), TAB()

Compatibility

MSX-BASIC 1.0 or higher