GetInt Method for LCField
This method retrieves an integer 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
newInt = thisField.GetInt (index)
Parameters
Parameter |
Description |
---|---|
index |
Long, >= 1. Index of the field data value to be retrieved. |
Return Value
Value |
Description |
---|---|
newInt |
Long. The indexth value in thisField, converted to an integer value. |
Example
Option Public
Uselsx "*lsxlc"
Sub Initialize
Dim Fld As New LCField (LCTYPE_TEXT)
Fld.Text = "1234.56789"
Dim vInt As Long
vInt = Fld.GetInt (1)
Print "The Int representation of the field is " & vInt
End Sub
Example Output
The Int representation of the field is 1234