Difference between revisions of "MC-Basic:STRING$"
m (1 revision) |
m (note template) |
||
| Line 26: | Line 26: | ||
''<ascii code>'': 0 to MaxLong | ''<ascii code>'': 0 to MaxLong | ||
| − | The | + | {{Note|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.}} |
|UNITS= | |UNITS= | ||
Revision as of 08:42, 14 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
| NOTE | |
| 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