Chapter Contents |
Previous |
Next |
Command Directory |
Return Immediately from a Function
ret{urn}
Format 1: |
return |
|
Format 2: |
return |
[SCALAR-TYPE-EXPRESSION] |
Format 3: |
return |
AGGREGATE-TYPE-EXPRESSION | {VALUE-LIST} |
return
command performs an immediate return from a function without executing any
further code in the function. Return values are supplied by the arguments.
Format 1:
This format is used for functions
that return
void
or
int
. In the case of functions
that return integers, the value in register 15 is returned.
Format 2: This format is used for functions that return a nonbitfield scalar. Except for functions that return an integer, you must always supply the SCALAR-TYPE-EXPRESSION argument if the function returns a scalar. See SCALAR-TYPE-EXPRESSION Argument for additional information.
Format 3: This format is used for functions that return an AGGREGATE-TYPE-EXPRESSION. An aggregate expression has a type of structure or union. See AGGREGATE-TYPE-EXPRESSION Argument for additional information.
{VALUE, VALUE, VALUE, . . .}
The values supplied with a return
command are assigned to the receiving structure or union in the same manner
as they are with the assign
command. See Rules for assigning VALUE-LISTs to aggregate objects in
assign.
return
void
or an
integer
. If the return
type is
integer
, the value in register 15 is returned.
return ptr
ptr
to the calling function.
return my_struc
my_struc
to the calling function.
return {1,2,'A'}
{1,2,'A'}
to the calling function.
return
command is not affected by changes in scope.
PROFILE | no |
configuration file | no |
Source window prefix | none |
Successful: 0 | |
Unsuccessful: 1 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.