Conversions 轉換
Angtos 角度轉成字串
Takes an angle in radians and converts it into a string, into a specific format.
Angtos Mode Format :
0 Degrees 度
1 Degrees/minutes/seconds 度 / 分 / 秒
2 Grads
3 Radians 弳
4 Surveyor's units
Assuming variable a has an angle in radians. eg:
(angtos a 0 0) returns "180"
(angtos a 0 4) returns "180.0000"
(angtos a 1 4) returns "180d0"0""
Fix 將數值轉換成整數
This function returns the convention of a real number to an Integer. eg:
(fix 8) returns 8
(fix 8.6) returns 8
Float 將數值轉換成實數
This function returns the convention of an Integer to a real number. (One can use either real or an Integer.) eg:
(float 8) returns 8.0000
(float 8.6) returns 8.6000
Ascii 字串第一個字元的『 ASCII 』碼
Returns the convention of the first character of a string into its ASCII character code. (An Integer) eg:
(ascii "a") returns 65
(ascii "BLUE") returns 66
Chr 整數所對應的 ASCII 單一字串
Returns the convention of an Integer representing an ASCII character code into a single character string. eg:
(chr 65) returns "A"
(chr 66) returns "B"
Atof 字串轉成實數值
Returns the convention of a string into a real number . eg:
(atof "9.3") returns 9.3000
(atof "2") returns 2.0000
Rtos 實數轉成字串
Returns the convention of a real number to a string into a
specified format.
Rtos Mode Format
1 Scientific 科學
2 Decimal 十進位
3 Engineering(feet & decimal inches) 工程
4 Architectural(feet & fractional inches) 建築
5 Arbituary fractional units 分數
The real number can be set according to mode and precision . eg:
(rtos 7.2 1 4) returns "7.200OE+00"
(rtos 7.2 2 2) returns "7.20"
Itoa 整數轉成字串
Returns the convention of an Integer into a string . eg:
(itoa 25) returns "25"
Atoi 字串轉成整數值
Returns the convention of a string into an Integer . eg:
(itoi "25") returns 25