![]() Chapter Contents |
![]() Previous |
![]() Next |
| APPLY |
| Category: | Object Oriented |
| Syntax | |
| Details | |
| Example | |
| See Also |
Syntax |
| CALL APPLY(control-id,method-name,arg-list-id); |
|
return-value=APPLY(control-id,method-name,
arg-list-id); |
| Details |
| Example |
Instead of using the following statement to invoke a method that you have defined and named METHOD,
control.method(10,'abc','xyz',x);you can use
args = makelist(4); args = setitemn(args,10,1); args = setitemc(args,'abc',2); args = setitemc(args,'xyz',3); args = setitemn(args,x,4); call apply(control,'method',args);
length _method_ $40; m: method arglist=args; call apply(otherControl,_method_, args);This calls the method with the same arguments to the otherControl.
m: method arglist=args;
_receivers_=getniteml(_self_,'_receivers_',
1, 1, 0);
if _receivers_ then do
r=listlen(_receivers_) to 1 by -1;
call apply(getiteml(_receivers_, r),
_method_, args);
end;
endmethod;
| See Also |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.