IBM Lotus Symphony


Chr 函数 [运行时]

返回与指定字符代码对应的字符。

语法:

Chr(Expression As Integer)

返回值:

字符串

参数:

Expression:表示一个有效的 8 位 ASCII 值(0-255)或 16 位 Unicode 值的数字变量。

利用 chr$ 函数,可以将特殊的控制序列发送到打印机或其他输出源。还可以利用该函数在字符串表达式中插入引号。

错误代码

5 无效的过程调用

示例:

sub ExampleChr

REM This example inserts quotation marks (ASCII value 34) in a string.

MsgBox "A "+ Chr$(34) +"short" + Chr$(34) +" trip."

REM The printout appears in the dialog as: A "short" trip.

end sub


产品反馈 | 其他文档 | 商标