Chapter Contents

Previous

Next
SAS Component Language: Reference

Passing Arguments to SCL Functions and CALL Routines

Some additional restrictions apply to the values that you pass as arguments to SCL functions and CALL routines. Some SCL functions and CALL routines accept only names of variables as arguments, but for most arguments you can specify either a literal value or the name of a variable that contains the desired value.

Note:   For some functions, passing missing values for certain arguments causes the SCL program to stop executing and to display an error message. Restrictions on argument values are described in the entries in SAS Component Language Dictionary.  [cautionend]


Input, Output, and Update Parameters

Parameters to functions and methods can be one of three types:

input
The value of the parameter is passed into the function, but even if the function modifies the value, it cannot pass the new value out to the calling function.

output
Output parameters are used to return a value from a function.

update
Update parameters can be used to pass a value into a function, and the function can modify its value and return the new value out to the calling function.

Note:   If you use dot notation to specify a parameter to a method, then the parameter is treated as an update parameter if the method does not have a signature or if the object is declared as a generic object. SCL executes the _setAttributeValue method for all update parameters, which could cause unwanted effects. See What Happens When Attribute Values Are Set or Queried for complete information.  [cautionend]

If you do not use dot notation to pass parameters to the functions and routines documented in SAS Component Language Dictionary, then all parameters are input parameters except for those listed in Functions With Update Parameters.

Functions With Update Parameters
Function Name Update Parameters
DELNITEM index
DIALOG all parameters other than entry
DISPLAY all parameters other than entry
FGET cval
FILEDIALOG filename
FILLIST description
LVARLEVEL n-level
CALL METHOD all parameters except entry and label
NAMEDIVIDE all parameters except name
NOTIFY all parameters except control-name and method-name
RGBDM RGB-color
SAVEENTRYDIALOG description
SEND all parameters except object-id and method-name
SETNITEMC index
SETNITEML index
SETNITEMN index
SETNITEMO index
SUPER all parameters except object-id and method-name
VARLEVEL n-level
VARSTAT varlist-2

Note:   The argument parameter of the DATA step SUBSTR (left of =) function is also an update parameter.  [cautionend]

For all methods that you define with the METHOD statement, all parameters are assumed to be update parameters unless either you specify input or output when you define the method or you invoke the method with SEND, NOTIFY, SUPER, or CALL METHOD. If you invoke the method with SEND, NOTIFY, SUPER, or CALL METHOD, then the first two parameters (listed in Functions With Update Parameters) are assumed to be input parameters.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.