Chapter Contents |
Previous |
Next |
SAS Component Language: Reference |
Example Class Definition
class Simple; public num total; addNums: public method n1:num n2:num return=num; total=n1+n2; return(total); endmethod; endclass;
The CLASS statement does not have to implement the methods. The methods may be only declared. For example:
class Simple; public num total; addNums: public method n1:num n2:num return=num / (scl=work.a.simMeth.scl'); endclass;The code to implement the method is contained in
work.a.simMeth.scl
(see USECLASS Block for the addNums Method).
For more information about defining and using classes, see SAS Object-Oriented Programming Concepts; ; and CLASS.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.