GetNumeric Method for LCField
This method retrieves a numeric value from a value in a field. If the requested data type is different from the field data type, conversion is automatically performed. If conversion is not possible, error LCFAIL_INVALID_CONVERT occurs.
Defined In
LCField
Syntax
Set newNumeric = thisField.GetNumeric(index)
Parameters
Parameter |
Description |
---|---|
index |
Long, >= 1. Index of the field data value to be retrieved. |
Return Value
Value |
Description |
---|---|
newNumeric |
LCNumeric. The index th value in thisField, converted to a numeric type. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim Fld As New LCField (LCTYPE_TEXT)
Fld.Text = "1234.56789"
Dim vNumr As LCNumeric
Set vNumr = Fld.GetNumeric (1)
Print "The Numeric representation of the field is " & vNumr.Text
End Sub
Example Output
The Numeric representation of the field is 1234.56789