|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
leokwok2001
註冊時間: 2011-02-10 文章: 13
第 1 樓
|
發表於: 星期四 二月 10, 2011 1:26 pm 文章主題: 各高手 string format 問題 |
|
|
有一個數值 -1234560.99 , 想變成string typ e.g. ($1,234,560.99) store in variable x , 請問vfp 怎麼寫? |
|
回頂端 |
|
|
aizz
註冊時間: 2007-01-29 文章: 171
第 2 樓
|
發表於: 星期四 二月 10, 2011 2:09 pm 文章主題: Re: 各高手 string format 問題 |
|
|
leokwok2001 寫到: | 有一個數值 -1234560.99 , 想變成string typ e.g. ($1,234,560.99) store in variable x , 請問vfp 怎麼寫? |
不難 |
|
回頂端 |
|
|
leokwok2001
註冊時間: 2011-02-10 文章: 13
第 3 樓
|
發表於: 星期四 二月 10, 2011 2:13 pm 文章主題: |
|
|
各高手請指點一下 |
|
回頂端 |
|
|
aizz
註冊時間: 2007-01-29 文章: 171
第 4 樓
|
發表於: 星期四 二月 10, 2011 2:15 pm 文章主題: |
|
|
老了
累了
退休了
躺在長灘島沙灘上享受陽光中.....
懶了............. |
|
回頂端 |
|
|
garfield Site Admin
註冊時間: 2003-01-30 文章: 2157
第 5 樓
|
發表於: 星期四 二月 10, 2011 5:23 pm 文章主題: |
|
|
Using TRANSFORM( ) with a large negative number that contains a decimal might result in numeric overflow when that number is passed in as a memory variable. You should use the STR( ) function instead with such numbers.
TRANSFORM(eExpression, [cFormatCodes])
cFormatCodes
Specifies one or more format codes that determine how to format the expression.
@$
Adds the current currency symbol specified by SET CURRENCY to currency and numeric values. By default, the symbol is placed immediately before or after the value. However, the currency symbol and its placement (specified with SET CURRENCY), the separator character (specified with SET SEPARATOR) and the decimal character (specified with SET POINT) can all be changed.
.
Specifies the decimal point position in currency and numeric values.
,
Separates digits to the left of the decimal point in currency and numeric values.
9
Specifies width of numeric values.
For example, if cFormatCodes is '999.99', the numeric characters are formatted with three characters to the left of the decimal point, and two characters to the right. _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. |
|
回頂端 |
|
|
leokwok2001
註冊時間: 2011-02-10 文章: 13
第 6 樓
|
發表於: 星期四 二月 10, 2011 5:42 pm 文章主題: |
|
|
thx |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|