Difference between revisions of "MC-Basic:TYPEOF"
m (1 revision) |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|MC-Basic:TYPEOF}} | ||
{{MC-Basic | {{MC-Basic | ||
|SHORT FORM= | |SHORT FORM= | ||
Line 14: | Line 15: | ||
|TYPE= | |TYPE= | ||
''<string>'': String<br> | ''<string>'': String<br> | ||
− | '' | + | <''return value''>: Long |
|RANGE= | |RANGE= | ||
''<string>'': string | ''<string>'': string | ||
− | '' | + | <''return value''>: 0, 1, 2 |
|UNITS= | |UNITS= | ||
Line 31: | Line 32: | ||
|LIMITATIONS= | |LIMITATIONS= | ||
− | Read | + | Read only |
|EXAMPLE= | |EXAMPLE= | ||
− | ?TYPEOF(“…”) | + | ?TYPEOF(“…”) ‘ returns 0 |
− | ?TYPEOF(TOASCII8$(“…”)) ‘ returns 1 | + | ?TYPEOF(TOASCII8$(“…”)) ‘ returns 1 |
− | ?TYPEOF(TOUTF8$(“…”)) | + | ?TYPEOF(TOUTF8$(“…”)) ‘ returns 2 |
|SEE ALSO= | |SEE ALSO= | ||
− | * [[ | + | * [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]] |
− | * [[ | + | * [[MC-Basic:TOASCII8$|TOASCII8$]] |
− | * [[ | + | * [[MC-Basic:TOUTF8$|TOUTF8$]] |
− | |||
+ | [[Category:MC-Basic:String Manipulation|TYPEOF]] | ||
}} | }} |
Latest revision as of 09:47, 2 May 2017
Language: | English • 中文(简体) |
---|
This function returns a number representing the type of the string (0 for no-type, 1 for ASCII-8, or 2 for UTF-8).
Syntax
TYPEOF(<string>)
Availability
Avilable since version 4.5.10
Type
<string>: String
<return value>: Long
Range
<string>: string
<return value>: 0, 1, 2
Scope
Configuration, Task or Terminal
Limitations
Read only
Examples
?TYPEOF(“…”) ‘ returns 0
?TYPEOF(TOASCII8$(“…”)) ‘ returns 1
?TYPEOF(TOUTF8$(“…”)) ‘ returns 2