SetFloat Method for LCField

This method assigns a value to a field of type float. If the field data type is different, conversion will be attempted. If conversion fails, error LCFAIL_INVALID_CONVERT will occur.

Defined In

LCField

Syntax

Call thisField.SetFloat (index, srcFloat)

Parameters

Parameter

Description

index

Long, >= 1. Index of the value to be assigned.

srcFieldlist

LCFieldlist. Value to be assigned to the field data value.

Example

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim field As New LCField (LCTYPE_TEXT)
  Dim number As Double
  number = Pi
  Call field.SetFloat (1, number)
  Print "The field's value is " & field.text(0)
End Sub

Example Output

The field's value is 3.14159265358979.