BookmarkSubscribeRSS Feed
🔒 This topic is locked. We are no longer accepting replies to this topic. Need further help? Please sign in and ask a new question.
odesh
Quartz | Level 8

Hello,

I have 2 questions on DS2 User Defined Methods ( Chapter 5 ).

 

Q 1 :

The third line of the example DS2 program shows the use of the "in_out" parameter. ( Please see attachment). 

I am not sure exactly what the in_out parameter does. It seems to somehow facilitate the parameters Amount, Rate and Years. These parameters are assigned actual values in the method init()...so I am not sure why we need the "in-out" parameter.

 

Q 2:  Could we not have defined the variables Amount, Rate and Years as global parameters (variables) just after the data _null_ statement instead of defining them twice as local variables in the interest() and init() methods ?

 

Thanks.

Odesh.

2 REPLIES 2
odesh
Quartz | Level 8
Please ignore Q 2 above. The variables are different.
Thanks.
Odesh.
Cynthia_sas
Diamond | Level 26

Hi:

  The instructor's suggested that you look at this Tech Support note that discusses how parameters can work with DS2:

http://support.sas.com/kb/50/823.html

 

Cynthia