### CCur

Basic and Crystal syntax.

##### Overloads

- CCur (number or currency)
- CCur (string)

##### Arguments

CCur (number or currency) | number or currency is a Number or Currency value or expression.
CCur (string) | string is a String value or expression.

##### Returns

Currency value

##### Action

CCur returns a Currency value created by converting the given Number, Currency or String type argument to a Currency value. If the conversion cannot be done, an error occurs.

##### Examples

The following examples are applicable to both Basic and Crystal syntax:

`CCur (200.20)`

In Crystal syntax this is equivalent to writing $200.20. In Basic syntax, CCur (200.20) is the way to directly create a Currency value of 200.20.

`CCur ("$200.20")`

Returns the Currency value CCur (200.20) given the String value "$200.20".

`CCur ("two hundred dollars")`

Causes an error to occur. The CCur function cannot convert the String "two hundred dollars" to a Currency value.

##### Comments

- This function is designed to work like the Visual Basic function of the same name.
- You can use the IsNumeric (str) or NumericText (str) function to check if the String argument can be converted to a Currency before doing the actual conversion. That way, if the conversion cannot be done, you can handle the situation appropriately.
- In Crystal syntax, you can use the To currency operator operator instead of CCur when converting from a Number value to a Currency value.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com