|
void CDialog_basedDlg::OnEqual()
{
if(st2 == 0)
{
UpdateData(TRUE);
m_op2 = m_num;
}
else
{
UpdateData(TRUE);
m_op2 = m_num;
}
======================================
If you meant the statements for one of the conditional result to be something of a placeholder, then a simple comment in that place denoting it to be such, would have been better than duplicating code.
OTOH, if you meant for the "else" portion to be FALSE, then your sloppiness is going to get you in a lot of trouble in the days and years ahead.
You have some good ideas, but you need to pay more attention to your work.
William
Fortes in fide et opere!
|
|
|
|
|
yea ! you have rightly pointed out the useless statement .Actually there was a problom in its continous multiplication and addition , i.e like 2+2+2+2 etc .then it was checking the state of the equal button . When i fixed that , i forgot to remove that !!!!
Tahir
|
|
|
|
|
So, what did you update?
fifi
If god wanted you to use a bow and arrows he wouldn't have invented assault weapons!
|
|
|
|
|
Well, there were some probloms in the calculations like simultanous multiplication and addition . I have fixed that probloms by setting thier flags .
Tahir
|
|
|
|
|
and now try calc.exe (This ones actually DOC-U-MENTED)
To iterate is human, to recurse is devine.
|
|
|
|
|
At least, this one have source code...
|
|
|
|
|
What's the point in publishing an article without even revealing your position in the subject
Oh, hold on thou......Where's the article???
I give you 2* just for the endeavour
Regards,
Vitaly Tomilov
Professional tooltips for all development platforms available on www.Tooltips.NET
|
|
|
|
|
My position on calculators is that they should calculate.
I'd bet his position is the similar.
Though thou art critical, it's "though" though, not "thou"!
|
|
|
|
|
I prefer my carclucocatcatar to calcucoraterocate.
|
|
|
|
|
Now that's the hellowa lot of a point
Regards,
Vitaly Tomilov
Professional tooltips for all development platforms available on www.Tooltips.NET
|
|
|
|
|
Should author of this article introduce calc.exe instead, what would be lost on programmers?
Should though lose its gh, what sound in the word would be lost?
Regards,
Vitaly Tomilov
Professional tooltips for all development platforms available on www.Tooltips.NET
|
|
|
|
|
> Should author of this article introduce calc.exe instead,
> what would be lost on programmers?
nothing much, nada, niente, nitcht, rien du tout, ничто, {}
> Should though lose its gh, what sound in the word would be lost?
Since "thou" is actually a word that is not synonymous with
"though" I defer to the authority, Webster (www.webster.com):
"though" is pronounced: '[th]O
"thou" is pronounced: '[th]au
|
|
|
|
|
What does you really mean by it ?
Tahir
|
|
|
|
|
mr. tomilov,
|
|
|
|
|
mr. Anonymous,
what's that supposed to mean?
|
|
|
|
|
..some financial functions, like NPV, IRR, PI etc...
www.kinkycode.com
99 little bugs in the code, 99 little bugs,
Fix 1 bug, recompile....
101 little bugs in the code...
|
|
|
|
|
How about adding Hex/Oct/Dec?
Best wishes,
Hans
|
|
|
|
|
HI
Yea , thats a good idea , can be done , i dont had much time when i made it , in future whenever i got some , i'll do that !
Thanks for your comment
Tahir;)
Tahir
|
|
|
|
|
I've just given it a 5 for:
- enthusiasm
- childish healthy attitude
- using english
- sharing act
- the program itself
by adding one point for each reason
rechi
|
|
|
|
|
Thanx for your giving a '5' .
Tahir
Tahir
|
|
|
|
|
I just gave you another '5' for your enthusiasm and the ability to produce a workable program. You can use better file names/class names and use proper conventions naming the resource identifiers for example.
Just a thought, when I write my first calculator program, I was not not happy at that time with so many functions I have to add for every button. I liked to write concise code. I used ON_CONTROL_RANGE to write a single function for all the numberical buttons and used their labeled text to find out what is pressed. You don't need to do it that way but sometimes exercize like becomes a good programming lessons. At least it makes it a little more challenging to wrok on.
Shahzad
|
|
|
|
|
which kind of lowers the rating I give to 1.
|
|
|
|
|
With a little bit polishing the source code (removing the useless standard VC comments and adding some of your own, proper formatting, a little more error handling) this could be a pretty standard implementation.
Remove also all the not used VC files from the zip file (opt, plg, ncb, clw), they are recreated at build time.
And most important, spell-check it. Is it calculator, calculater, caclulater or what? Use one of the freely available spell-checkers on the web (until CP gets its own).
cheers
Andreas
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Thanx for your comments and I'll try to do that . But you have asked that i should a spell checker , i think there is no concept in scientific calcualeter , is it logical ?
Tahir;)
Tahir
|
|
|
|
|
Sorry for being unclear, the spell checking was meant to be used on the article text, not for the program.
Holy Sh*t! I'm speechless. (hey, that's a first) Marc Clifton, The Lounge
|
|
|
|