sum of variables

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
ABOUBALLACK
Posts: 14
Joined: September 22nd, 2016, 9:24 am

sum of variables

Post 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 );
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: sum of variables

Post 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 );
ABOUBALLACK
Posts: 14
Joined: September 22nd, 2016, 9:24 am

Re: sum of variables

Post by ABOUBALLACK »

thank you
Post Reply