Chapter Contents |
Previous |
Next |
_METHOD_ |
Category: | System Variable |
Details | |
Example | |
See Also |
Details |
_method_=_method_;
_METHOD_ is useful when you have one or more methods that share the same section of code but which require a CALL SUPER.
In order to use _METHOD_, you must use the DECLARE or LENGTH statement to declare it as a character variable.
_METHOD_ has a valid value only when a method is executing.
Example |
For a window control, you may define the _update and _bupdate methods to execute the same section of code if they perform similar functions:
length _method_ $40; BUPDATE: UPDATE: method; ...code for _update and _bupdate methods... call super(_self_, _method_); endmethod;
Without _METHOD_, you would not know which method to do a CALL SUPER on, so you would have to code the above as
BUPDATE: method; methodName = '_bupdate'; link update1; endmethod; UPDATE: method; methodName = '_update'; link update1; endmethod; UPDATE1: ...code for _update and _bupdate goes here... call super(_self_, methodName); return;
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.