Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

redchannel

macrumors regular
Original poster
Nov 23, 2008
126
0
I know the variable for addition is sum.
what is the variable for subtraction ?
 
Generally speaking, the names of variables are irrelevant to what you are actually doing with them.
 
Can someone just tell me what the variable for subtract is ? thats all i want
 
Frankly I don't think anyone understands what exactly you are asking.

I took a guess and am telling you that there is no variable name that has to be used with addition nor subtraction. You can call variables whatever you want.

I can say

Code:
int sum = 5 / 2;

and Objective-C (or any other language) would be perfectly happy with that.

If you are just interested in the mathematical term for the result of a subtraction for trivia's sake, that would be difference.
 
reading you question literally, I think you mean what variable must you place the difference. "difference" is the word mathamaticians use to decribe the result of a subtraction.

But for coding.

sum = 1 + 2
thing = 1 + 2
var1 = 1+ 2

dif = 3 - 1
thing = 3 - 1
(even)
sum = 3 -1

will all accomplish just what they look like they will accomplish

sum = 9 -1
sum = sum - 5

results in, sum containing 3

You get to choose what the variable name is.

Jerry
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.