數字類的資料型態
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.
數字型的運算元
+ : Add one number to another
– : Subtract one number from another
* : Multiply two numbers
/ : Divide one decimal number by another
div : Divide one integer number by another(整數位的商)
mod : Remainder from dividing one integer by another(整數位的餘)
數字類的涵數
Abs Returns the absolute value of a signed number
Max Gives the maximum of two integer values
Min Gives the minimum of two integer values
Mean Gives the average of a set of numbers
Sqr Gives the square of a number(平方)
Sqrt Gives the square root of a number(均方根)
Exp Gives the exponent of a number(指數)
Shl Shifts the bits in a number left
Shr Shifts the bits in a number right
Tan Gives the Tangent of a number(三角涵數 正切)
Cos Gives the Cosine of a number(三角涵數 餘弦)
Sin Gives the Sine of a number(三角涵數 正弦)
數值轉字串涵數
Str Converts a number to a string in a simple manner
CurrToStr Converts a Currency variable to a string
Format Number to string conversion with formatting
IntToStr Converts an integer to a string
IntToHex Converts a number into a hexadecimal string
字串轉數值涵數
StrToInt Converts an integer string into an integer
StrToIntDef Fault tolerant version of StrToInt
StrToFloat Converts a decimal string to a number
隨機文章
- OMV 6 , Docker / Portainer 差異蠻大的 (2023-07-21)
- 我所認為的民主 (2009-12-10)
- 系統漏洞不是發生 也不是產生 是發現 (2017-01-10)
- 玩VM Intel / Broadcom 網卡有無可取代的位置 (2020-07-15)
- 微軟有提供了跨平台的程式編輯工具 而且是免費 (2020-01-27)

![[chatGPT 測試] DSM 7 有什麼特色](https://chihping.aflypen.com/wp-content/uploads/2023/03/usb-ga13f61ece_1280-300x221.jpg)






