DBWCDbl

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Library Reference > PDMSystem >

DBWCDbl

available from build: 20020408

Description

Converts in double the numeric string passed as argument. The purpose of this function is to replace the standard cdbl function of the VBScript run-time library, because the cdbl is dependent from the Local Regional settings of the computer, and so it can return incorrect results for numbers with the dot ( . ) as decimal separator, when the Local Regional setting is set to have a comma ( , ) for decimal separator. The function does not support explicit signs at the begin of the string.

Syntax

Function DBWCDbl(input_string)

Parameters

input_string

It is the numeric string to be converted in double

Return Values

If not "" (empty), the converted double value of the input string

Example

Sub main()
 MsgBox DBWCDbl("7.25")
 MsgBox DBWCDbl(".25")
 MsgBox DBWCDbl("725")
 MsgBox DBWCDbl("725.")
End sub