Difference between revisions of "MC-Basic:STRING$"
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= STRING$(''<number>,<string>'')<br> STRING$(''<number>,<ascii code>'') |AVAILABILITY= All versions |DESCRIPTION= STRING$ produces a new stri…') |
m (1 revision) |
(No difference)
| |
Revision as of 16:10, 13 December 2010
STRING$ produces a new string with the specified number of characters. Each character is the first character of the specified string argument or the specified ASCII code.
Syntax
STRING$(<number>,<string>)
STRING$(<number>,<ascii code>)
Availability
All versions
Type
<return value>: String
<number>: Long
<string>: String
<ascii code>: Long
Range
<return value>: String
<number>: 0 to MaxLong
<string>: String
<ascii code>: 0 to MaxLong
The ASCII code set comprises 256 codes (0 to 255). If the specified <ascii code> is less than 255, <ascii code> is evaluated modulo 256 and the remainder is used as the ASCII code.
Scope
Configuration, Task or Terminal
Limitations
Read-Only. Input string cannot be a UTF-8 string.
Examples
? STRING$(23, “*”) generates a string of 23 asterisks
? STRING$(23, “*5”) generates a string of 23 asterisks
? STRING$(9, 65) generates a string of 9 A’s à AAAAAAAAA