CURSORGETPROP()

Set Currency, Set("Currency")

SET CURRENCY dictates the format in which currency values are displayed.

Usage

SET CURRENCY TO LEFT | RIGHT SET CURRENCY TO cSymbol cLeftOrRight = SET( "CURRENCY" ) cSymbol = SET( "CURRENCY", 1 )
SET CURRENCY specifies whether the currency symbol should precede or follow the number, and what that symbol should be. These settings are used for any numeric field where the Format property includes the "$" symbol, or if you're using the Transform() function either on a currency value or with an "@$" format clause.

In VFP 5 and earlier, when the currency symbol is more than one character long and placed to the left of the number, it can be truncated if the InputMask does not provide sufficient space for the entire expression. For example, with currency set to "SEK" to the left of the number, TRANSFORM(12345.6789, "@$999999.9999") returns "K12345.6789" This was fixed in VFP 6.0.


Example

SET CURRENCY TO " DMK" SET CURRENCY RIGHT * The @$ function is the older equivalent of Format @ 1,1 SAY 12345.6789 PICTURE "@$99999.9999"  * DISPLAYS "12345.6789 DMK"
SET("CURRENCY") returns either "RIGHT" or "LEFT", while SET("CURRENCY",1) returns the currency symbol.

See Also

Configuration Files, Format, InputMask, Transform(), Set Point, Set Separator, Set SysFormats


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net