Page 1 of 1

sum of variables

Posted: November 28th, 2018, 4:28 am
by ABOUBALLACK
I have three numeric variables A, B and C and I want to automatically calculate A = B + C and display a message "the total is A".
it doesn't work, please help!
PROC A
preproc
A = sum(B, C);
errmsg((" the total is : %d"), A );

Re: sum of variables

Posted: November 28th, 2018, 7:24 am
by josh
sum is for calculating the sum of a column in a roster. For what you are you just need to use the "+" operator:
PROC A
preproc
A = B + C;
errmsg(" the total is : %d", A );

Re: sum of variables

Posted: November 28th, 2018, 7:58 am
by ABOUBALLACK
thank you