The SCL Debugger |
Abbreviation: | CALC |
Syntax | |
Details | |
Examples |
Syntax |
CALCULATE expression |
is any standard debugger expression, which can include SCL functions and dot notation dot notation.
Details |
The CALCULATE command is an online calculator that evaluates expressions for the debugger. Expressions can include standard debugger expressions, SCL functions, and many of the SAS arithmetic functions. You can also use dot notation to perform operations on values that are returned by object attributes and methods.
Examples |
Add 1.1, 1.2, 3.4 and multiply the result by 0.5:
DEBUG> calc (1.1+1.2+3.4)*0.5The output to the debugger MESSAGE window is
calc (1.1+1.2+3.4)*0.5 2.85
Calculate the values of the variable SALE minus the variable DOWNPAY and then multiply the result by the value of the variable RATE. Divide that value by 12 and add 50:
DEBUG> calc (((sale-downpay)*rate)/12)+50
Calculate the sum of the values of array variables A(1), A(2), and A(3):
DEBUG> calc sum(a(1), a(2), a(3))
Concatenate the string, the value of variable X, and the value returned from getMaxValue method on object1:
DEBUG> calc "Values="||x||object1.getMaxValue()
Display the definition of the macro CKVARS:
DEBUG> calc "%ckvars"
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.