最新文章
Delphi函數
數學函數 (Arithmetic Routines)
Unit: System
======================================================================
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;
Delphi的字串類資料型態&函數
字串類的資料型態
Str1 : Char; // Holds a single character, small alphabet
Str2 : WideChar; // Holds a single character, International alphabet
Str3 : AnsiChar; // Holds a single character, small alphabet
Str4 : ShortString; // Holds a string of up to 255 Char’s
Str5 : String; // Holds strings of Char’s of any size desired
Str6 : AnsiString; // Holds strings of AnsiChar’s any size desired
Str7 : WideString; // Holds strings of WideChar’s of any size desired
Delphi的數字類資料型態&函數
數字類的資料型態
Type Storage size Range
Byte 1 0 to 255
ShortInt 1 -127 to 127
Word 2 0 to 65,535
SmallInt 2 -32,768 to 32,767
LongWord 4 0 to 4,294,967,295
Cardinal 4* 0 to 4,294,967,295
LongInt 4 -2,147,483,648 to 2,147,483,647
Integer 4* -2,147,483,648 to 2,147,483,647
Int64 8 -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Single 4 7 significant digits, exponent -38 to +38
Currency 8 50+ significant digits, fixed 4 decimal places
Double 8 15 significant digits, exponent -308 to +308
Extended 10 19 significant digits, exponent -4932 to +4932
* Note : the Integer and Cardinal types are both 4 bytes in size at present (Delphi release 7), but are not guaranteed to be this size in the future. All other type sizes are guaranteed.
測試文章
Sorry, no posts were found.