1. 程式人生 > >Delphi常用系統函式總結

Delphi常用系統函式總結

Unit System

函式原型 function Concat(s1 [, s2,..., sn]: string): string; 說明 與 S := S1 + S2 + S3 ...; 相同. 將字串相加.

函式原型 function Copy(S: string; Index, Count: Integer): string;說明 S : 字串. Indexd : 從第幾位開始拷貝. Count : 總共要拷貝幾位. 從母字串拷貝至另一個字串.

函式原型 procedure Delete(var S: string; Index, Count:Integer);說明 S : 字串. Indexd : 從第幾位開始刪. Count : 總共要刪幾位. 刪除字串中的數個字元.

函式原型 procedure Insert(Source: string; var S: string; Index: Integer);說明 Source : 子字串. S : 被插入字串. Indexd : 從第幾位開始插入. 將一個子字串插入另一個字串中.

函式原型 function Length(S: string): Integer; 求字元數

函式原型 function Pos(Substr: string; S: string): Integer;說明 Substr : 子字串.S : 母字串. 尋找子字串在母字串中的位置.

函式原型 function LowerCase(const S: string): string; 將字串全部轉為小寫字母.

函式原型 function UpperCase(const S: string): string; 將字串全部轉為大寫字母.

pos(obj,target) 在target字串中找出第一個出現obj的第一個字元位置,如果找不到,返回0.

function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;功能 返回替換後的字串說明 rfReplaceAll為替換全部內容;rfIgnoreCase為忽略大小寫

function StringToGUID(const S: string): TGUID;功能 返回字串S轉換成全域性標識說明 如果字串非法將觸發異常

function GUIDToString(const GUID: TGUID): string;功能 返回全域性標識GUID轉換成字串

函式原型 procedure Str(X [: Width [: Decimals ]]; var S); 將數值轉換為格式化的字串.說明 X : 欲轉換的整數 or 實數. Width : 格式化長度.(Integer) Decimals : 小數點位數.(Integer)

函式原型 procedure Val(S; var V; var Code: Integer); 將字串轉為數字.說明 S : 欲轉換的字串. V : 轉換後的整數 or 實數.Code : Code = 0 表示轉換成功.

Unit SysUtils

函式原型 function NewStr(const S: string): PString; 在 heap 中配置一個新的字串空間給PString 指標.

函式原型 procedure DisposeStr(P: PString); 在 heap 中釋放一個字串空間 PString指標.

函式原型 function IntToHex(Value: Integer; Digits: Integer): string;

函式原型 function IntToStr(Value: Integer): string;

函式原型 function StrToInt(const S: string): Integer;

函式原型 function StrToIntDef(const S: string; Default: Integer): Integer; 說明 Value : 欲轉換的整數. Digits : 欲轉換為幾位數的 Hex.

函式原型 function Trim(const S: string): string; 將字串前後的空白及控制字元清掉.

函式原型 function TrimLeft(const S: string): string; 將字串左邊的空白及控制字元清掉.

函式原型 function TrimRight(const S: string): string; 將字串右邊的空白及控制字元清掉.

函式原型 function AdjustLineBreaks(const S: string): string; 將字串的換行符號全部改為#13#10

函式原型 function StrAlloc(Size: Cardinal): PChar; 配置字串空間. 說明 Size=字串最大空間+1

函式原型 function StrBufSize(Str: PChar): Cardinal; 傳回由 StrAlloc 配置空間的大小

函式原型 function StrCat(Dest, Source: PChar): PChar; 字串相加.

函式原型 function StrComp(Str1, Str2 : PChar): Integer; 比較兩字串大小.

函式原型 function StrCopy(Dest, Source: PChar): PChar; 拷貝字串.

函式原型 procedure StrDispose(Str: PChar); 釋放StrAlloc or StrNew所配置的空間.

函式原型 function StrECopy(Dest, Source: PChar): PChar; 拷貝字串並傳回字串結束位址.

函式原型 function StrEnd(Str: PChar): PChar; 傳回字串結束位址.

函式原型 function StrIComp(Str1, Str2:PChar): Integer; 比較兩字串大小.(不分大小寫)

函式原型 function StrLCat(Dest, Source: PChar; MaxLen: Cardinal): PChar;字串相加.(指定長)

函式原型 function StrLComp(Str1, Str2: PChar; MaxLen: Cardinal):Integer; 比較兩字串大小.(指定長)

函式原型 function StrLCopy(Dest, Source: PChar; MaxLen: Cardinal): PChar; 拷貝字串.(指定長)

函式原型 function StrLen(Str: PChar): Cardinal; 傳回字串長度.(不含終止位元)

函式原型 function StrLIComp(Str1, Str2: PChar; MaxLen: Cardinals): Integer; 比較兩字串大小.(指定長,不分大小寫)

函式原型 function StrLower(Str: PChar): PChar; 將字串全部轉為小寫字母.

函式原型 function StrMove(Dest, Source: PChar; Count:Cardinal): PChar; 從來源字串拷貝n個Bytes到目標r串.(不含終止位元)

函式原型 function StrNew(Str: PChar): PChar; 配置字串空間.

函式原型 function StrPas(Str: PChar): string; 將 null-terminated 字串轉為Pascal-style 字串.

函式原型 function StrPCopy(Dest: PChar; Source: string): PChar; 拷貝 Pascal-style 字串到null-terminated 字串.

函式原型 function StrPLCopy(Dest: PChar; const Source: string; MaxLen: Cardinal): PChar; 拷貝 Pascal-style 字串到null-terminated 字串.(指定長)

函式原型 function StrPos(Str1, Str2: PChar): PChar; 子字串在母字串中的位置.(第一個位置) 說明 Str1 母字串;Str2 子字串

函式原型 function StrUpper(Str: PChar): PChar; 將字串全部轉為大寫字母.

StrAlloc 配置一個最大長度為Size-1 的緩衝區給null 結尾字串function StrAlloc(Size: Word): PChar;

StrBufSize 傳回由StrAlloc 配置的字串緩衝區內可以儲存的最大字元數。StrBufSize( S: PChar ): Cardinal;

StrCat連結兩個字串並傳回該字串。function StrCat(Dest, Source: PCar): PChar;

StrComp 比照兩個字串。function StrComp(Str1, Str2 : Pchar): Integer;

StrCopy 拷貝Source 字串到Dest 上。function StrCopy(Dest, Source: PChar): PChar

StrDispose 釋回一個字串空間。function StrDispose(Str:PChar);

StrECopy 拷貝Source 字串到Dest 上並傳回指向該字串結尾的指標。function StrECopy(Dest, Surce: Pchar): Pchar;

StrEnd 傳回一指標指向字串的結尾function StrEnd(Str: Pchar): Pchar;

StrLCat 將Source 字串連結到Dest 字串後,並傳回連結的字串。function StrLCat(Dest, Source:PCar; MaxLen: Word): PChar;

StrIComp 比較兩個字串具無大小寫區別function StrIComp(Str1, Str2:Pchar): Integer;

StrLComp 比較兩個字串到所指定的最大長度function StrLComp(Str1, Str2:Pchar; MaxLen: Word): Integer;

StrLCopy 從一字串拷貝指定字元數到另一字串Function StrLCopy(Dest,Source:PChar;MaxLen: Cardinal): PChar;

StrLen 傳回字串的長度。function StrLen(Str: PChar):Cardinal;

StrLIComp 比較兩個字串到所指定的最大長度具無大小寫區別。function StrLIComp(Str1, Str2:PChar; MaxLen: Word):Integer;

StrLower 將字串轉成小寫。function StrLower(Str: PChar):PChar;

StrMove 拷貝Count 字元數,從Source 到Dest字串。function StrMove(Dest, Source:PChar; Count: Cardinal): PChar

StrNew 從堆積配置一個字串。function StrNew(Str: PChar):PChar;

StrPas 將null 結尾字中轉成一個Pascal 格式字串。function StrPas(Str: Pchar):String;

StrPCopy 拷貝一個Pascal 格式字串到一個null結尾字串。Function StrPCopy(Dest:PChar;Source: String): PChar;

StrPLCopy 拷貝MaxLen 所指字元數,從Pascal格式字串到null 結尾字串。Function StrPLCopy(Dest:Pchar;cost Source: string;MaxLen: Word): PChar;

StrPos 傳回一指標指向在Str1 內最先出現 Str2 字串的位置。function StrPos(Str1, Str2: Pchar): Pchar;

StrScan 傳回一指標指向在Str 字串中第一個出現chr 字元的位置。function StrScan(Str: PChar; Chr: Char): PChar;

StrRScan 傳回一指標指向在Str 子串中最後出現chr 字元的位置。function StrRScan(Str: Pchar; Chr: Char): PChar;

StrUpper 將字串轉成大寫。function StrUpper(Str: PChar):PChar;

日期與時間函式 (Date and Time Routines)

Unit: SysUtils

Date 傳回今天日期。function Date: TDateTime;

DateTimeToStr 將時間格式轉為字串。function DateTimeToStr(DateTime: TDateTime):String;

DateTimeToString 將時間格式轉為字串。procedure DateTimeToString(var Result: string;const Format: string;DateTime: TDateTime);

DateToStr 將日期格式轉為字串。function DateToStr(Date: TDateTime): String;

DayOfWeek 傳回今天星期幾。function DayOfWeek(Date: TDateTime): Integer; 傳回值是一整數,1~7. 星期日為1.

DecodeDate 分解所指定的日期為年、月、日。procedure DecodeDate(Date: TDateTime;var Year, Month, Day:Word);

DecodeTime 分解所指定的日期為時、分、秒。procedure DecodeTime(Time: TDateTime;var Hour, Min, Sec,MSec: Word);

EncodeDate 傳回將年、月、日所組合的日期格式。function EncodeDate(Year, Month, Day: Word):TDateTime;

EncodeTime 傳回將時、分、秒所組合的時間格式。function EncodeTime(Hour, Min, Sec, MSec:Word): TDateTime;

FormatDateTime 以指定的格式傳回日期時間。function FormatDateTime(const Format: string;DateTime: TDateTime):String;

Now 傳回現在的日期時間。function Now: TDateTime;

StrToDate 將字串轉為日期格式。function StrToDate(const S:string): TDateTime;

StrToDateTime 將字串轉為日期時間格式function StrToDateTime(const S: string): TDateTime;

StrToTime 將字串轉為時間格式。function StrToTime(const S:string): TDateTime;

Time 傳回現在時間。function Time: TDateTime;

TimeToStr 將時格式轉為字串。function TimeToStr(Time:TDateTime): String;

檔案管理函式

Unit: SysUtils

函式原型 function ExtractFileDir(const FileName: string): string;

函式原型 function ExtractFileDrive(const FileName: string): string;

函式原型 function ExtractFileExt(const FileName: string): string;

函式原型 function ExtractFileName(const FileName: string): string;

函式原型 function ExtractFilePath(const FileName: string): string;

函式原型 function DeleteFile(const FileName: string): Boolean;

函式原型 function RenameFile(const OldName, NewName: string):Boolean;

函式原型 function FileExists(const FileName: string): Boolean;

函式原型 procedure FindClose(var F: TSearchRec);

函式原型 function FindFirst(const Path: string; Attr: Integer; var F: TSearchRec): Integer;

函式原型 function FindNext(var F: TSearchRec): Integer;說明 成功傳回0

ChangeFileExt 變更檔案的副檔名。

function ChangeFileExt(const FileName,Extension: string):string; DateTimeToFileDate 將Delphi 的日期格式轉換為DOS的日期格式。

functionDateTimeToFileDate(DateTime:TDateTime): Longint;

DeleteFile 刪除一個檔案。function DeleteFile(const FileName: string):Boolean;

DiskFree 傳回磁碟的可用空間。function DiskFree(Drive: Byte): Longint;

DiskSize 傳回指定磁碟的容量大小。function DiskSize(Drive: Byte): Longint;

ExpandFileName 傳回一個完整的路徑及檔名字串。function expandFileName(const FileName: string):string;

ExtractFileExt 傳回檔案的副檔名。function ExtractFileExt(const FileName string):string;

ExtractFileName 傳回檔案的檔名。function ExtractFileName(const FileName: string):string;

ExtractFilePath 傳回檔案的路徑。function ExtractFilePath(const FileName: string):string;

FileAge 傳回檔案的年紀function FileAge(const FileName: string):Longint;

FileCreate 以指定檔名建立一個檔案。function FileCreate(const FileName: string):Integer;

FileClose 關閉指定的檔案。procedureFileClose(Handle: Integer);

FileDateToDateTime 將DOS 的日期格式轉為Delphi 的日期格式。function FileDateToDateTime(FileDate: Longint):TDateTime;

FileExists 判別檔案是否存在。function FileExists(const FileName: string):Boolean;

FileGetAttr 傳回檔案屬性。function FileGetAttr(const FileName: string):Integer;

FileGetDate 傳回檔案的日期及時間。function FileGetDate(Handle: Integer): Longint;

FileRead 從指定的檔案讀入資料。function FileRead(Handle:Integer; var Buffer;Count:Longint):Longint;

FileSearch 在目錄列中搜尋指定的檔案。function FileSearch(constName, DirList: string):string;

FileSeek 改變檔案遊標的位置。function FileSeek(Handle: Integer;Offset: Longint;Origin: Integer):Longint;

FileSetAttr 設定檔案屬性。function FileSetAttr(const FileName: string;Attr:Integer): Integer;

FileSetDate 設定檔案的日期及時間。procedure FileSetDate(Handle: Integer; Age:Longint);

FileOpen 開啟檔案。function FileOpen(const FileName: string; Mode:Word): Integer;

FileWrite 寫資料到檔案。function FileWrite(Handle:Integer;const Buffer; Count:Longint): Longint;

FindClose 終止找尋第一個/下一個的動作。procedure FindClose(var SearchRec: TSearchRec);

FindFirst 尋找第一個符合的檔案並設定其屬性。

function FindFirst(const Path: string;Attr: Word; var F:TSearchRec): Integer;

FindNext 傳回下一個符合的檔案。function FindNext(var F:TSearchRec): Integer;

RenameFile 變更檔名。function RenameFile(const OldName,NewName: string):Boolean;

轉換函式(Transfer Routines)

Unit: System

Chr 傳回ASCII 碼所對應的字元。function Chr(X: Byte): Char;

Delphi 原始碼任務 ( http://home.kimo.com.tw/bruce0211/ ) 打字整理15

High 傳回叄數在範圍內的最高值。function High(X);

Low 傳回叄數在範圍內的最低值。function Low(X);

Ord 傳回一個有序型態所對應的順序值。function Ord(X): Longint;

Round 將一個實數值四捨五入而傳回整數值。function Round(X: Real):Longint;

Trunc 將一個實數值去尾而傳回整數值。function Trunc(X: Real):Longint;

pred(x) pred('D')='C', pred(true)=1;

succ(x) succ('Y')='Z', succ(pred(x))=x

ord(x) 求x在字符集中的序號,如ord('A')=65

chr(x) chr(65)='A'

round(x) 四捨五入

trunc(x) trunc(4.8)=4,trunc('-3.6')=-3

upcase(x) upcase('a')='A'

hi(I) hi($2A30)=$2A

lo(I) lo($2A30)=$30

random(n) 產生[0,n)間的隨機整數

sizeof(name) 求出某型別或變數在記憶體中佔用的位元組數

swap(num) 交換int的高低位 swap($3621)=$2136

Frac 求一個實數的小數部份

R := Frac(123.456); { 0.456 }

R := Frac(-123.456); { -0.456 }

Int 求一個實數的整數部份

R := Int(123.456); { 123.0 }

R := Int(-123.456); { -123.0 }

函式原型 function High(X); 傳回註腳的最大值

函式原型 function Low(X); Low 傳回註腳的最小值.

函式原型 function Ord(X): Longint; 傳回列舉型態的數值.

函式原型 function Round(X: Extended): Longint; 將實數轉為整數.(有四捨五入)

函式原型 function Trunc(X: Extended): Longint; 將實數轉為整數.(小數直接捨棄)

函式原型 function VarArrayCreate(const Bounds: array of Integer; VarType: Integer): Variant; 建立一個variant array.

函式原型 function VarArrayOf(const Values: array of Variant): Variant; 建立一個簡單的一維variant array

函式原型 function VarArrayLock(var A: Variant): Pointer; 將variant陣列==>指定給一陣列變數.

函式原型 procedure VarArrayUnlock(var A: Variant); 解除上述的指定.

函式原型 function VarIsArray(const V: Variant): Boolean; 傳回Variant是否為一個陣列.

函式原型 function VarIsNull(const V: Variant): Boolean; 傳回Variant是否為NULL.

函式原型 function VarAsType(const V: Variant; VarType: Integer): Variant; 將Variant轉為另外一個型態的Variant.

函式原型 procedure VarCast(var Dest: Variant; const Source: Variant; VarType: Integer);說明 VarType不可為varArray or varByRef.

函式原型 function VarType(const V: Variant): Integer; 傳回Variant的型態.

函式原型 procedure VarClear(var V: Variant); 將variant清除,成為Unassigned狀態.

函式原型 procedure VarCopy(var Dest: Variant; const Source: Variant); 拷貝一個variant.說明 與Dest:=Source;效果一樣.

函式原型 function VarFromDateTime(DateTime: TDateTime): Vari ant; 將DateTime轉為Variant.

函式原型 function VarToDateTime(const V: Variant): TDateTime; 將Variant轉為DateTime.

函式原型 function Hi(X): Byte; 傳回高位元數字.Hi($1234); { $12 }

函式原型 procedure Include(var S: set of T; I:T); 說明 加入I元素到S中. 加入一個元素到一組元素.

函式原型 function Lo(X): Byte; Lo($1234); { $34 }

函式原型 procedure Move(var Source, Dest; Count: Integer); 從來源變數拷貝n個Bytes到目的變數.

函式原型 function ParamCount: Integer; 直接由執行檔後加上傳入變數的個數.

函式原型 function ParamStr(Index: Integer): string;說明 ParamStr(0);傳回執行檔的名稱及完整目錄.

函式原型 function Random [ ( Range: Integer) ]; 說明 0<=X<Range

函式原型 function Swap(X); Swap 將一組變數的高低位元交換.

函式原型 function UpCase(Ch: Char): Char; 將一字元轉為大寫字母.

函式原型 procedure Dec(var X[ ; N: Longint]);說明 Dec(X) ==> X:=X-1; Dec(X,N) ==> X:=X-N; 使變數遞減.

函式原型 procedure Inc(var X [ ; N: Longint ] );說明 Inc(X) ==> X:=X-1;Inc(X,N) ==> X:=X-N; 使變數遞增.

函式原型 function Odd(X: Longint): Boolean; 檢查是否為奇數.

函式原型 function Assigned(var P): Boolean; Assigned 測試指標變數是否為nil. 說明 當@P=nil ==> 傳回FALSE

數學函式

Abs 傳回叄數的絕對值。 function Abs(X);

ArcTan 傳回正切函式的反函式值。 function ArcTan(X: Real): Real;

Cos 傳回餘弦函式值 function Cos(X: Real): Real; (X 以弧度為單位)。

Exp 傳回自然指數值。 function Cos(X: Real): Real;

Frac 傳回叄數的小數部份。 function Frac(X: Real): Real;

Int 傳回叄數的整數部份。 function Int(X: Real): Real;

Ln 傳回自然對數值。 function Ln(X: Real): Real;

Pi 傳回圓周率π的值。 function Pi: Real;

Sin 傳回正弦函式值。 function Sin(X: Real): Real;

Sqr 傳回叄數的平方。 function Sqr(X: Real): (Real);

Sqrt 傳回叄數的平方根。 function Sqrt(X: Real): Real;

輸出入函式Unit: System

AssignFile 指定一個檔案到檔案變數。procedure AssignFile(var f, String);

CloseFile 關閉檔案。procedure CloseFile(var F);

Eof 判斷是否已到檔案結尾。

Typed or untyped files: functionEof(var F): BooleanText files:function Eof [ (var F: Text) ]:Boolean;

Erase 清除檔案內容。procedure Erase(var F);

FilePos 傳回目前檔案遊標位置。function FilePos(var F): Longint;

FileSize 傳回檔案的大小function FileSize(var F):Longint;

GetDir 傳回指定磁碟的工作目錄。procedure GetDir(D: Byte; var S: String);

IOResult 傳回最後I/O 執行的狀態。function IOResult: Integer;

MkDir 建立一子目錄。procedure MkDir(S: String);

Rename 變更外部檔案的檔名。procedure Rename(var F; Newname);

Reset 開啟一個已存在的檔案。procedure Reset(var F [: File; Recsize: Word ] );

Rewrite 建立並開啟一個新檔。procedure Rewrite(var F: File [; Recsize: Word ] );

RmDir 刪除一個空目錄。procedure RmDir(S: String);

Seek 移動檔案遊標。procedure Seek(var F; N: Longint);

Truncate 刪截目前位置以後的檔案內容。procedure Truncate(var F);

浮點數轉換函式 Unit: SysUtils

FloatToDecimal 將浮點數值分成小數及整數部份的數字傳回。

procedure FloatToDecimal(var Result: TFloatRec;Value:Extended;Precision, Decimals:Integer);

FloatToStrF 依照指定格式將浮點數轉成字串描述。

function FloatToStrF(Value: Extended; Format:TFloatFormat;Precision,Digits: Integer): string;

FloatToStr 將浮點數轉成字串描述。function FloatToStr(Value: Extended): string;

FloatToText 將所給的浮點數值,分成小數及整數部份的數字依照格式傳回。

function FloatToText(Buffer: Pchar; Value:Extended;Format:TFloatFormat;Precision,Digits: Integer): Integer;

FloatToTextFmt 將浮點數依照格式轉成字串傳回。

function FloatToTextFmt(Buffer: PChar; Value:Extended;Format: PChar) :Integer;

FormatFloat 將浮點數值依照Format 格式傳回。

function FormatFloat(constFormat: string;Value:Extended):string;

StrToFloat 將所給字串轉成一個浮點數值。

function StrToFloat(const S: string): Extended;

TextToFloat 將一個null 結尾字串轉成浮點數值

function TextToFloat(Buffer: PChar;var Value:Extended): Boolean;

流程控制函式 Unit: System

Break 終止迴圈。如for, while 及repeat 迴圈。

Continue 繼續迴圈。如for, while 及repeat 迴圈。

Exit 離開目前的區塊。procedure Exit;

Halt 停止程式的執行並回到作業系統。

動態配置函式Unit: System

Dispose 釋回一個動態變數。procedure Dispose(var P: Pointer);

Free 釋放一個物件複本。procedure Free;

FreeMem 釋回一給定大小的動態變數。procedure FreeMem(var P:Pointer; Size: Word);

GetMem 建立一個指定大小的動態變數,並由Pointer 叄數傳回位址。procedure GetMem(var P:Pointer; Size: Word);

New 建立一個新的動態變數,並將Pointer 叄數指向它。procedure New(var P: Pointer);function New(<pointer type>):Pointer;

MaxAvail 傳回連續最大的可配置空間。function MaxAvail: Longint;

MemAvail 傳回所有的可配置空間。function MemAvail: Longint;

指標和位址函式 Unit: System

addr 傳回指定物件的位址。function Addr(X): pointer;

Assigned 判斷是否一個函式或程式是nil function Assigned(var P):Boolean;

CSeg 傳回CS 程式段暫存器的內容。function CSeg: Word;

DSeg 傳回DS 資料段暫存器的內容。function DSegt: Word;

Ofs 傳回叄數的偏移位址。function Ofs(X): Word;

Ptr 將所指定的節段及偏移位址組合到一個指標。function Ptr(Seg, Ofs: Word):Pointer;

Seg 傳回叄數的節段位址。function Seg(X): Word;

SPtr 傳回SP 堆疊存器的內容。function SPtr: Word;

SSeg 傳回SS 堆疊段暫存器的內容。function SSeg: Word;

控制檯函式 Unit: WinCrt

AssignCrt 將文字檔連結到一個控制檯視窗。 procedure AssignCrt(var f: Text);

ClrEol 清附遊標位置到該行最後的所有字元。procedure ClrEol;

ClrScr 清附螢幕並重置遊標至左上角。 procedure ClrScr;

CursorTo 移動遊標至給定座標。 procedure CursorTo(X, Y:Integer);

DoneWinCrt 結束控制檯視窗。 procedure DoneWinCrt;

GotoXY 移動遊標至給定座標。 procedure GotoXY(X, Y: Byte);

InitWinCrt 建立控制檯視窗。 procedure InitWinCrt;

KeyPressed 判斷是否有一按鍵。 function KeyPressed:Boolean;

ReadBuf 從控制檯視窗讀入一行。 function ReadBuf(Buffer: Pchar;Count: Word):

ReadKey 讀取按鍵字元。function ReadKey: Char;

ScrollTo 捲動控制檯視窗至顯示位置。procedure ScrollTo(X, Y: Integer);

TrackCursor 捲動控制檯視窗宜到遊標可見。procedure TrackCursor;

WhereX 傳回遊標的X 座標。function WhereX: Byte;

WhereY 傳回遊標的Y 標標。function WhereY: Byte;

WriteBuf 寫入一區塊字元到控制檯視窗。procedure WriteBuf

WriteChar 寫一個字元到控制檯視窗。procedure WriteChar(CH: Char);

http://www.cnblogs.com/doit8791/archive/2012/05/17/2507073.html