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, by using the CDbl
method the calculation will be done in Double
data type in cases, when the integer type would normally be used for calcullations.
Use this method to provide conversion independent on local system settings
from any other data type to the value of the Single
type. Conversion of string value
, where the decimal separator is "period" or "comma", will be completed correctly in both cases. Compare with VBScript.CSng
If the expression lies outside the acceptable range of the Single
subtype, then an error occurs.
If it is needed to convert the real number into the value of the String
type regardless on local setting of OS Windows
(i.e. the real number would always have "full stop" or "comma" as a decimal separator), then the Pm.TransformValue
method can be used with parameter nType = 120, 121
This method is not
functional in Web panels
. The Pm.ToNumber
method can be used.