Originale-mail to me for new edition

 

Other standard routines(其他标准例程)

 

The table below lists frequently used procedures and functions found in Borland product libraries. This is not an exhaustive inventory of standard routines.

下表列出了建立在Borland产品库中被经常使用的过程和函数。下表不是标准例程的完整目录。

 

Index table(索引表):

 

Abort

Addr

AllocMem

ArcTan

Assert

Assigned

Beep

Break

ByteToCharIndex

Chr

Close

CompareMem

CompareStr

CompareText

Continue

Copy

Cos

CurrToStr

Date

DateTimeToStr

DateToStr

Dec

Dispose

ExceptAddr

Exit

Exp

FillChar

Finalize

FloatToStr

FloatToStrF

FmtLoadStr

FmtStr

Format

FormatDateTime

FormatFloat

FreeMem

GetMem

GetParentForm

Halt

Hi

High

Inc

Initialize

Insert

Int

IntToStr

Length

Lo

Low

LowerCase

MaxIntValue

MaxValue

MinIntValue

MinValue

New

Now

Ord

Pos

Pred

Ptr

Random

ReallocMem

Round

SetLength

SetString

ShowException

ShowMessage

ShowMessageFmt

Sin

SizeOf

Sqr

Sqrt

Str

StrToCurr

StrToDate

StrToDateTime

StrToFloat

StrToInt

StrToTime

StrUpper

Succ

Sum

Time

TimeToStr

Trunc

UniqueString

UpCase

UpperCase

VarArrayCreate

VarArrayDimCount

VarArrayHighBound

VarArrayLock

VarArrayLowBound

VarArrayOf

VarArrayRedim

VarArrayRef

VarArrayUnlock

VarAsType

VarCast

VarClear

VarCopy

VarToStr

VarType

 

 

 

 

 

 

Details(详细资料):

 

Procedure or Function

过程或函数

Description

描述

Top

Abort

Ends the process without reporting an error.

结束进程而不报告错误。

Top

Addr

Returns a pointer to a specified object.

返回指向指定对象的指针。

Top

AllocMem

Allocates a memory block and initializes each byte to zero.

分配内存块并初始化每个字节为零。

Top

ArcTan

Calculates the arctangent of the given number.

计算给定数值的反正切函数值。

Top

Assert

Tests whether a boolean expression is True.

测试一个布尔表达式是否为True

Top

Assigned

Tests for a nil (unassigned) pointer or procedural variable.

测试nil(未赋值的)指针或程序型变量。

Top

Beep

Generates a standard beep using the computer speaker.

用计算机扬声器产生一次标准的蜂鸣声。

Top

Break

Causes control to exit a for, while, or repeat statement.

导致控制退出forwhilerepeat语句。

Top

ByteToCharIndex

Returns the position of the character containing a specified byte in a string.

返回包含指定字节的字符在串中的位置。

Top

Chr

Returns the character for a specified value.

返回指定值的字符。

Top

Close

Terminates the association between a file variable and an external file.

终止文件变量和外部文件之间的关联。

Top

CompareMem

Performs a binary comparison of two memory images.

对两个内存映象进行二进制比较。

Top

CompareStr

Compares strings case sensitively.

比较串(大小写敏感)。

Top

CompareText

Compares strings by ordinal value and is not case sensitive.

以序数值值比较串(大小写不敏感)。

Top

Continue

Returns control to the next iteration of for, while, or repeat statements.

返回控制到forwhilerepeat语句的下一次重复。

Top

Copy

Returns a substring of a string or a segment of a dynamic array.

返回串的子串或动态数组的片段。

Top

Cos

Calculates the cosine of an angle.

计算角度的余弦值。

Top

CurrToStr

Converts a currency variable to a string.

转换货币变量到串。

Top

Date

Returns the current date.

返回当前日期。

Top

DateTimeToStr

Converts a variable of type TDateTime to a string.

转换类型为TDateTime的变量到串。

Top

DateToStr

Converts a variable of type TDateTime to a string.

转换类型为TDateTime的变量到串。

Top

Dec

Decrements an ordinal variable.

递减序数变量。

Top

Dispose

Releases memory allocated for a dynamic variable.

释放分配给动态变量的内存。

Top

ExceptAddr

Returns the address at which the current exception was raised.

返回当前异常被引发处的地址。

Top

Exit

Exits from the current procedure.

从当前过程中退出。

Top

Exp

Calculates the exponential of X.

计算eX次幂,这里的e是自然对数的底,即2.71828182845905...

Top

FillChar

Fills contiguous bytes with a specified value.

以指定的值填充相邻的字节。

Top

Finalize

Uninitializes a dynamically allocated variable.

反初始化一个动态分配的变量。

Top

FloatToStr

Converts a floating point value to a string.

转换浮点值到串。

Top

FloatToStrF

Converts a floating point value to a string, using specified format.

用指定的格式转换浮点值到串。

Top

FmtLoadStr

Returns formatted output using a resourced format string.

用资源格式化串返回格式化的输出。

Top

FmtStr

Assembles a formatted string from a series of arrays.

用格式化串和数组序列联合建立格式化的串。(过程)

Top

Format

Assembles a string from a format string and a series of arrays.

返回用格式化串和数组序列联合建立的格式化的串。(函数)

Top

FormatDateTime

Formats a date-and-time value.

格式化日期时间值(返回串)。

Top

FormatFloat

Formats a floating point value.

格式化浮点值(返回串)。

Top

FreeMem

Disposes of a dynamic variable.

释放一个动态变量。

Top

GetMem

Creates a dynamic variable and a pointer to the address of the block.

创建一个动态变量及指向其块地址的指针。

Top

GetParentForm

Returns the form or property page that contains a specified control.

返回包含指定控件的窗体或属性页。

Top

Halt

Initiates abnormal termination of a program.

非正常终止程序。

Top

Hi

Returns the high-order byte of an expression as an unsigned value.

返回作为无符号值的表达式的高位字节。

Top

High

Returns the highest value in the range of a type, array, or string.

返回一个类型、数组或串的最高值。

Top

Inc

Increments an ordinal variable.

递增序数变量。

Top

Initialize

Initializes a dynamically allocated variable.

初始化动态变量。

Top

Insert

Inserts a substring at a specified point in a string.

在串中指定的位置插入子串。

Top

Int

Returns the integer part of a real number.

返回实数数值的整数部分。

Top

IntToStr

Converts an integer to a string.

转换整数到串。

Top

Length

Returns the length of a string or array.

返回串或数组的长度。

Top

Lo

Returns the low-order byte of an expression as an unsigned value.

返回作为无符号值的表达式的高位字节。

Top

Low

Returns the lowest value in the range of a type, array, or string.

返回一个类型、数组或串的最低值。

Top

LowerCase

Converts an ASCII string to lowercase.

转换ASCII串到小写。

Top

MaxIntValue

Returns the largest signed value in an integer array.

返回整数数组中最大的含符号值。

Top

MaxValue

Returns the largest signed value in an array.

返回数组中最大的含符号值。

Top

MinIntValue

Returns the smallest signed value in an integer array.

返回整数数组中最小的含符号值。

Top

MinValue

Returns smallest signed value in an array.

返回数组中最小的含符号值。

Top

New

Creates a new dynamic variable and references it with a specified pointer.

创建一个新的动态变量和用指定指针对其的引用。

Top

Now

Returns the current date and time.

返回当前日期和时间。

Top

Ord

Returns the ordinal value of an ordinal-type expression.

返回序数型表达式的序数值。

Top

Pos

Returns the index of the first character of a specified substring in a string.

返回指定子串首字符在串中的索引。

Top

Pred

Returns the predecessor of an ordinal value.

返回序数值的前驱值。

Top

Ptr

Converts a specified address to a pointer.

转换指定的地址到指针。

Top

Random

Generates random numbers within a specified range.

在指定的范围内产生随即数。

Top

ReallocMem

Reallocates a dynamic variable.

再分配动态变量。

Top

Round

Returns the value of a real rounded to the nearest whole number.

返回与实数最接近的整数值。

Top

SetLength

Sets the dynamic length of a string variable or array.

设置串变量或数组的动态长度。

Top

SetString

Sets the contents and length of the given string.

设置给定串的内容和长度。

Top

ShowException

Displays an exception message with its address.

用异常的地址现实其异常消息。

Top

ShowMessage

Displays a message box with an unformatted string and an OK button.

用未格式化的串和OK按钮显示消息。

Top

ShowMessageFmt

Displays a message box with a formatted string and an OK button.

用格式化的串和OK按钮显示消息。

Top

Sin

Returns the sine of an angle in radians.

返回弧度角的正弦函数值。

Top

SizeOf

Returns the number of bytes occupied by a variable or type.

返回变量或类型占用的字节数。

Top

Sqr

Returns the square of a number.

返回数值的平方值。

Top

Sqrt

Returns the square root of a number.

返回数值的平方根值。

Top

Str

Formats a string and returns it to a variable.

格式化串并将结果返回到变量中。

Top

StrToCurr

Converts a string to a currency value.

转换串到货币变量。

Top

StrToDate

Converts a string to a date format (TDateTime).

转换串到日期格式(TDateTime)。

Top

StrToDateTime

Converts a string to a TDateTime.

转换串到TDateTime

Top

StrToFloat

Converts a string to a floating-point value.

转换串到浮点值。

Top

StrToInt

Converts a string to an integer.

转换串到整数。

Top

StrToTime

Converts a string to a time format (TDateTime).

转换串到时间格式(TDateTime)。

Top

StrUpper

Returns a string in upper case.

返回大写的串。

Top

Succ

Returns the successor of an ordinal value.

返回序数值的后继值。

Top

Sum

Returns the sum of the elements from an array.

返回数组中元素的和。

Top

Time

Returns the current time.

返回当前时间。

Top

TimeToStr

Converts a variable of type TDateTime to a string.

转换TDateTime类型的变量到串。

Top

Trunc

Truncates a real number to an integer.

截断实数到整数。

Top

UniqueString

Ensures that a string has only one reference. (The string may be copied to produce a single reference.)

确保串仅有一个引用。(串可以被复制以产生单个引用。)

Top

UpCase

Converts a character to uppercase.

转换字符到大写。

Top

UpperCase

Returns a string in uppercase.

返回串的大写。

Top

VarArrayCreate

Creates a variant array.

创建变体数组。

Top

VarArrayDimCount

Returns number of dimensions of a variant array.

返回变体数组的维数。

Top

VarArrayHighBound

Returns high bound for a dimension in a variant array.

返回变体数组中某一维的最高范围。

Top

VarArrayLock

Locks a variant array and returns a pointer to the data.

锁定变体数组并返回指向数据的指针。

Top

VarArrayLowBound

Returns the low bound of a dimension in a variant array.

返回变体数组中某一维的最低范围。

Top

VarArrayOf

Creates and fills a one-dimensional variant array.

创建并填充一个一变体数组。

Top

VarArrayRedim

Resizes a variant array.

改变变体数组的尺寸。

Top

VarArrayRef

Returns a reference to the passed variant array.

返回传递变体数组的引用。

Top

VarArrayUnlock

Unlocks a variant array.

对变体数组解除锁定。

Top

VarAsType

Converts a variant to specified type.

转换变量到指定的类型。

Top

VarCast

Converts a variant to a specified type, storing the result in a variable.

转换变量到指定的类型,并存储结果到变量中。

Top

VarClear

Clears a variant.

清除变体。

Top

VarCopy

Copies a variant.

复制变体。

Top

VarToStr

Converts variant to string.

转换变体到串。

Top

VarType

Returns type code of specified variant.

返回指定变体的类型代码

Top

 

For information on format strings, see Format strings.

有关格式化串的信息,见格式化串(联机帮助)

 

Topic groups(主题组)

 

See also(相关主题)

Standard routines and I/O: Overview(标准例程和I/O:概述)

 

 

编者注

由于本节篇幅较长,所以直接对照翻译以方便阅读。