vb6 - handle the total of Integers exceeding Long -
I have the following code:
Integer dim as the integer dim R
>. To handle this case: I have three options:Over the limit
long
- write as
a (or r ) Define = ((CLNG (L) + R) / 2)
- New variable to
long
:Announce
long S as the slow S = S + L + R
I'm confused who to implement Is the best for
I will choose # 2 I think (not sure) that it is a bit smaller than # 1 Uses less memory because the equation has only one long value where L or R to Long will be replaced by a space for 2 long values.
I'I am thinking that after compiling the # 2 and # 3, one can come looking for (or very close) and I personally think that in this case an additional The variables will not be more readable at all. The difference is that in # 2, the results of L + R can not be saved anywhere, but for calculation the registers went away.
I'm thinking a lot here, but I'm posting it partially because I hope that if I am wrong then someone will correct me anyway, with the above logic, I Had to go with # 2 Edit: At least I have full confidence that if one of the options uses less memory than any other, then it is # 2, but they are all equal in that respect You can.
Comments
Post a Comment