Sets a value into all the elements of the series. Optional Start and End element parameters are available to control which elements in the series will be assigned the replacement seed-Value.  When the Start and End elements index numbers are not used the entire series will be contain the replacement seed-value.

 

This function makes clearing the entire series value of its previous values a fast and simple process.

 

Syntax:

SetSeriesValues( seriesName, seedValue, [Start-Element-Num], [End-Element-Num] )

 

Parameter:

Description:

seriesName

The name of series to be changed.

seedValue

The replacement value to use for the series, or for the range of elements designated between the Start and End element number range.

[Start-Element-Num]

The earliest, or lowest series index value from which seed-value will begin replacing the values in the series.

[End-Element-Num]

The latest, or highest series index value at which the seed-value replacements will stop being replaced.

 

Example:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  Create a Series with 5-elements
SetSeriesSize( TestSeries, 5 )
 
'  Check the count of the TestSeries
iElementCount = GetSeriesSize( TestSeries )
 
'  Create Column Titles
PRINT
PRINT "Series Elements with Values:"
PRINT "Series Element", "Element Value"
PRINT "--------------", "-------------"
 
'  Assign an Ndx number to each Element
For Ndx = 1 TO iElementCount STEP 1
  '  ClearRankAdjustments
  TestSeries[Ndx] = Ndx
 
  '  Show Each Element Value
  PRINT "TestSeries[" + AsString(Ndx, 0) + "] = ", TestSeries[Ndx]
Next '  ndx
 
'  Set All the Elements in the Series to Zero
SetSeriesValues(TestSeries, 0 )
 
'  Create More Column Titles
PRINT  
PRINT "Series Elements with New Values:"
PRINT "Series Element", "Element Value"
PRINT "--------------", "-------------"
 
'  Show each element after the new value is assigned
For Ndx = 1 TO iElementCount STEP 1
  '  Show Each Element Value
  PRINT "TestSeries[" + AsString(Ndx, 0) + "] = ", TestSeries[Ndx]
Next '  ndx
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Returns:

Series Elements with Values:

Series Element Element Value

-------------- -------------

TestSeries[1] =  1.000000000

TestSeries[2] =  2.000000000

TestSeries[3] =  3.000000000

TestSeries[4] =  4.000000000

TestSeries[5] =  5.000000000

 

Series Elements with New Values:

Series Element Element Value

-------------- -------------

TestSeries[1] =  0.000000000

TestSeries[2] =  0.000000000

TestSeries[3] =  0.000000000

TestSeries[4] =  0.000000000

TestSeries[5] =  0.000000000

 

Links:

GetSeriesSize, SetSeriesSize

See Also:

Series Functions

 


Edit Time: 9/25/2017 09:09:54 AM


Topic ID#: 557

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software