最新文章

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.


精選文章

常Latin1遇到UTF8加上簡繁中文的攪和 好一個難解的亂碼

真是頭痛的編碼問題latin1 UTF8是的,我又遇到問題了,這次的問題是出在程式本身,因為某一個相簿系統,預設的編碼是 latin1_swedish_ci,也就是預設的是Latin1編碼(ISO 8859-1),存中文的時候,可以存,也可以顯示,但是如果直接用phpMyAdmin等工具去看資料庫的時候,就會遇到一堆亂碼了,我自己是偷懶,直接寫了一個php的涵式,在Latin1和UTF8中切換,用了快了兩年,也是相安無事,反正亂碼就亂碼,我程式能讀的到,能解碼,能更新刪除就好,要我去把編碼翻掉,大改相簿系統,那就算了吧!我沒有這麼多的力氣。