Dear Sir,
Is it possible to code for a Calc to perform the events in single Method for 0-9,operators etc???
If Yes, please suggest with Example.
Thank You
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 16, 2015, 2:01 AM EDT
Is this a requirement for developing a scientific calculator ??
vinit shukla16 reputationPosted Mar 16, 2015, 8:23 PM EDT
No Its for General Calculator.
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 17, 2015, 12:14 AM EDT
Use multiple methods -
void Add ()
void Sub ()
--
Because the use can input any number of values from front-end..
Say,
If I type 10 + 11 - 3 and hit "Enter"
Then,
on Add(10 +11) ==21
and on Sub (21-3) == 19.
-------------
SO... it is better to use multiple methods.