Used this function when the custom script function is going to return more than one value.

 

Syntax:

returnvalue1 = script.returnValueList[1]

 

Parameter:

Description:

<number>

Number value used here will return the value at comma location in the return list of values.

 

See example shown below to see how the values as passed and accessed.

 

Example:

CUSTOM FUNCTION -> START ========================================
'  ==============================================================
'  AnyFunction01  -  START
'  ==============================================================
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  AnyFunction01 example uses a simple Fibonacci process
'  to increment a value for each value variables
'  --------------------------------------------------------------
'script.Execute("AnyFunction01", AnyNum1)
'  --------------------------------------------------------------
VARIABLES: x   Type: Integer
VARIABLES: value1, value2, value3, value4, value5   Type: Floating
'  --------------------------------------------------------------
'  Get parameter value
value1 = script.parameterList[1]
 
'  Calculate first 5-Fibonacci numbers
If value1 > 0 THEN
  value1 = value1 + 0
  value2 = value1 + value1
  value3 = value2 + value1
  value4 = value3 + value2
  value5 = value4 + value3
ELSE
  value1 = 0
  value2 = 0
  value3 = 0
  value4 = 0
  value5 = 0
ENDIF '  value1 > 0
'  --------------------------------------------------------------
'  Used to set a list of number return values.
script.SetReturnValueList( value1, value2, value3, value4, value5 )
'  --------------------------------------------------------------
'  ==============================================================
'  AnyFunction01  -  END
'  ==============================================================
CUSTOM FUNCTION -> END ==========================================

 

'  Custom Function Calling Script
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VARIABLES: AnyNum1   Type: Floating
'  --------------------------------------------------------------
'  AnyNum1 is gets its value from a parameter in this example
AnyNum1 = startValue
 
'  "AnyFunction01" is a user created function shown below
script.Execute("AnyFunction01", AnyNum1)
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PRINT "------ ",
PRINT "value1 ", script.returnValueList[1]
PRINT "value2 ", script.returnValueList[2]
PRINT "value3 ", script.returnValueList[3]
PRINT "value4 ", script.returnValueList[4]
PRINT "value5 ", script.returnValueList[5]
PRINT "------ ",
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'  

 

Results:

------ START,
value1 ,1.000000000,
value2 ,2.000000000,
value3 ,3.000000000,
value4 ,5.000000000,
value5 ,8.000000000,
------ END,

 

 


Edit Time: 4/6/2017 02:16:46 PM


Topic ID#: 505

 

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