---
title: "Type conversion operators"
canonical: "https://docs.cuesystem.com/space/CVCHELP/522682871/Type%20conversion%20operators"
format: markdown
---
> Macro (toc)

---

# CDouble

The operator converts an integral numeric expression to a Double type. (e.g. CDouble(12) = 12.0). It is useful in floating point dividing. 

#### Syntax 

```visualbasic
CDouble(NumericExpression) As Double
```

#### Example 

```visualbasic
Var Number As Long := 3 
Var Result As Double 

Result := 10 / Number 
DebugPrint(Result) 
Result := 10 / CDouble(Number) 
DebugPrint(Result)
```

It prints to the debug window: 

```visualbasic
3.000000 
3.333333
```

# CLong

The operator converts a numeric expression to a Long type (e.g. CLong(12.34) = 12). 

#### Syntax 

```visualbasic
CLong(NumericExpression) As Long
```

#### Example 

```visualbasic
Var Number As Double := 5.432 
Var Result As Double 

Result := 10 * Number 
DebugPrint(Result) 
Result := 10 * CLong(Number) 
DebugPrint(Result)
```

It prints to the debug window: 

```visualbasic
54.320000 
50.000000
```