目录

# 字符串的 ASCII/ANSI 转换

以下函数用于在字符串与 ASCII 代码 (或 ANSI 代码) 之间相互转换。

## Asc Function (BASIC)

返回字符串表达式中第一个字符的 ASCII (美国信息交换标准码) 值。

## Chr Function

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

## Str Function

The Str function converts the contents of variables into a string. It handles numeric values, dates, strings and currency values.

Positive numbers are preceded by a blank space. Negative numbers are preceded by a minus sign.

For numeric values the string returned by the Str function is locale-independent. Hence the dot is used as the decimal separator when needed.

If a string is passed as argument, it is returned without any changes.

Dates are converted into locale-dependent strings.

## Val Function

Use the Val function to convert a string that represents a number into numeric data type.

The string passed to the Val function is locale-independent. This means that commas are interpreted as thousands separators and a dot is used as the decimal separator.

## CByte Function

Converts a string or a numeric expression to the Byte type.