NumberListInsertRange Method for LCStream

This method inserts a number range into a number list LCStream object.

The stream must be in the LCSTREAMFMT_NUMBER_LIST format.

Defined In

LCStream

Syntax

Call lcStream. NumberListInsertRange(index , startNumber, endNumber)

Parameters

Parameter

Description

index

Long, in the range 1 to lcStream.Rangecount +1. The index position at which to insert the value.

startNumber

Double. The first number of the range.

endNumber

Double. The second number of the range.

Usage Notes®

Number list streams can contain a mixture of single number values and number ranges (as shown in the example). This method scans the list starting with the first element, searching for range values and counting them. Once the count reaches index, the range value at that position is returned. If the list contains a mixture, this might not be the indexth value in the list.

Example

Option Public
Uselsx "*lsxlc" 
Sub Initialize
  Dim numlist As New LCStream (0, 0, LCSTREAMFMT_NUMBER_LIST)
  numlist.Text = "1.11, 22.2, 33, 4.444, 50-55, 66, 77-79"
  Call numlist.NumberListInsertRange (2, 8.8, 9.9)
  Print "The new stream is " & numlist.Text
End Sub

Example Output

The new stream is 1.11, 22.2, 33, 4.444, 66, 50 - 55, 8.8 - 9.9, 77 - 79