CDbl - function of language VBScript

Returns an expression that has been converted to the value of the Double type.
In the PROMOTIC system it is better to use the Pm.ToNumber method.
Double CDbl(Variant expression)
expression(Variant) Any valid expression.
The conversion functions can be used e.g. if you want some operation result to be expressed as a particular data type (rather than the default data type). For example, use CDbl or CSng to force Double or Single data type in cases where integer arithmetic normally would occur.
Use the CDbl function to provide internationally aware conversion from any other data type to a value of the Double type. For example, different decimal separators and thousands separators are properly recognized depending on the locale setting of your system.

Caution: This function can convert only values with separators set locally (e.g. value 3.14 or 3,14). Therefore a problem arises when values in the text form originate on another computer with different setting. That's why it is recommended the Pm.CDbl method that solves this problem!
VBScriptSelect and copy to clipboard

Dim n
n = CDbl(2345.5678)   ' Returns 2345.5678
n = CDbl(2600)   ' Returns 2600
PROMOTIC 9.0.25 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.