Used this function to access a value in a series that is passed to Script-Object function.


Access to a series is defined as follows:

Auto-Indexed properties or Auto-Index series are offset based.

Non-Auto-indexed series are manual direct index based.


Access to any series to be passed requires the use of the AsSeries() function.


Script-Object parameters are numbered by their sequence location in the left-to-right order in how they appear in the script.Execute() call statement.  


See Custom Parameters for more details.



y = script.GetSeriesValue( SeriesParameterNumber, offsetOrIndex )





Series parameter sequence location number.  


Element offset for use with Auto-Index series, or a series element index for use with Manually index series.



'  ----------------------------------------------
'  AsSeries() function to send is required when a series,
'  is passed as a Script-Object parameter.  AsSeries()
'  passes the series memory location.  Without the
'  AsSeries() function only the value of an element is
'  passed and other elements will not be accessible.
'  ----------------------------------------------
'  Count the number of series parameters
x = script.seriesParameterCount
SetSeriesSize( testSeries, 10 )
For i = 1 TO 10
   testSeries[ i ] = Random( 100 )
For i = 1 TO 10
  PRINT i, "Series Value", testSeries[ i ], _
            script.Execute( "SeriesExample", _
                            AsSeries( testSeries ), i )

'  ----------------------------------------------


Earlier version of GetSeriesValue() required a "-1" added to the users offset to get the correct series element.  This next example shows how to adjust the offset:
'  SeriesExample is defined as:
  script.SetReturnValue( script.GetSeriesValue( 1, x-1 ))


Value in each accessed element of the series.



Script, Script Functions, Script Properties, AsSeries(), SetReturnValue, Execute, SetSeriesSize, ParameterList, seriesParameterCount

See Also:


Edit Time: 2/25/2018 10:49:58 AM

Topic ID#: 359

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