Difference between revisions of "MC-Basic:RIGHT$"
(Created page with '{{MC-Basic |SHORT FORM= |SYNTAX= RIGHT$(''<string>,<expression>'') |AVAILABILITY= All versions |DESCRIPTION= RIGHT$ returns the specified number of characters from the right-…') |
|||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:RIGHT$}} | ||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 23: | Line 24: | ||
|TYPE= | |TYPE= | ||
− | '' | + | <''return value''>: String<br> |
''<string>'': String<br> | ''<string>'': String<br> | ||
− | '' | + | <''expression''>: Long |
|RANGE= | |RANGE= | ||
− | '' | + | <''return value''>: String<br> |
''<string>'': String<br> | ''<string>'': String<br> | ||
− | '' | + | <''expression''>: 0 to MaxLong |
|UNITS= | |UNITS= | ||
Line 42: | Line 43: | ||
|LIMITATIONS= | |LIMITATIONS= | ||
− | Read | + | Read only |
|EXAMPLE= | |EXAMPLE= | ||
Line 51: | Line 52: | ||
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[MC-Basic:LEFT$|LEFT$]] |
− | * [[ | + | * [[MC-Basic:MID$|MID$]] |
+ | [[Category:MC-Basic:String Manipulation|RIGHT$]] | ||
}} | }} |
Latest revision as of 09:20, 27 April 2017
Language: | English • 中文(简体) |
---|
RIGHT$ returns the specified number of characters from the right-hand side of the string.
In UTF-8 supporting versions 4.5.1 and higher NULL characters are no longer cut
out from strings, resulting in a different behavior:
Len of Chr$(0) is 1:
In former versions NULL characters could not appear in the middle of strings, since
the concationation process cut these characters from the resulting string.
Syntax
RIGHT$(<string>,<expression>)
Availability
All versions
Type
<return value>: String
<string>: String
<expression>: Long
Range
<return value>: String
<string>: String
<expression>: 0 to MaxLong
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
Test=”This string is too short”
-->PRINT RIGHT$(Test,4)
hort