Difference between revisions of "MC-Basic:ASC/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Languages}} == 缩写 == == 格式 == ?ASC(<''string''>{,<''Index''>}) == 可用版本 == 所有版本,自版本4.5.10起适用于UTF-8字符串 == 描述 == ASC根...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages}}
+
{{Languages|MC-Basic:ASC}}
  
 
== 缩写 ==
 
== 缩写 ==
Line 25: Line 25:
  
 
<''index''>: Long
 
<''index''>: Long
==  
+
 
范围 ==
+
== 取值范围 ==
 
<''return value''>: 0 to 127 for an ASCII-8 <''string''>, 0 to MAXLONG for a UTF-8 ''<string>''
 
<''return value''>: 0 to 127 for an ASCII-8 <''string''>, 0 to MAXLONG for a UTF-8 ''<string>''
  
Line 43: Line 43:
 
== 限制 ==
 
== 限制 ==
 
只读
 
只读
==
+
 
例子 ==
 
例子 ==
 
--> ?ASC("example",3)
 
--> ?ASC("example",3)
Line 52: Line 52:
  
 
1.010000000000000e+02              ‘返回字母e的ASCII值
 
1.010000000000000e+02              ‘返回字母e的ASCII值
 +
 
Common Shared UTF8Str as String of UTF8
 
Common Shared UTF8Str as String of UTF8
  
Line 61: Line 62:
  
  
== 可见 ==
+
== 参见 ==
 
* [[MC-Basic:INSTR|INSTR]]
 
* [[MC-Basic:INSTR|INSTR]]
 
* [[MC-Basic:SPACE$|SPACE$]]
 
* [[MC-Basic:SPACE$|SPACE$]]

Latest revision as of 06:31, 17 April 2017

语言: English  • 中文(简体)‎

缩写

格式

?ASC(<string>{,<Index>})

可用版本

所有版本,自版本4.5.10起适用于UTF-8字符串

描述

ASC根据ASCII-8返回ASCII字符值,根据UTF-8返回Unicode值。

<return value>: 所指定的ASCII字符与ASCII-8 <string>相应,或所指定Unicode值与UTF-8 <string>相应<string>。

<string>: 指定字符的字符串表达式。 如果字符串为空,该函数返回值0。

<index>: 可选实际值定义ASCII-8字符或UTF-8符号的在“<string>”中的位置进行选择。 如果索引被省略或值为0,则选择字符串的第一个ASCII-8字符或UTF-8符号。

类型

<return value>: Double

<string>: String

<index>: Long

取值范围

<return value>: 0 to 127 for an ASCII-8 <string>, 0 to MAXLONG for a UTF-8 <string>

<string>: String

<index>: 0 to MaxLong

单位

默认

使用范围

Configuration, Task or Terminal

限制

只读

例子 == --> ?ASC("example",3)

9.700000000000000e+01              ‘返回字母a的ASCII值

--> ?ASC("example")

1.010000000000000e+02              ‘返回字母e的ASCII值

Common Shared UTF8Str as String of UTF8

UTF8Str = UTF$(196) + UTF$(197) + UTF$(198)

?ASC(UTF8str,2)

1.970000000000000e+02


参见