Information on else if blocks

I am creating a Super Calculator application for daily purpose which has the features of,

  1. Temperature converter
  2. Speed convertor
  3. storage unit converter
  4. numeral system converter
  5. area calculator
  6. volume calculator
  7. capacity calculator
  8. Age calculater
  9. 15+ more features

As mentioned above there are many features and succesfully create this app i get a doubt

How many else if blocks can i use because i need 200+ else if blocks when a button is clicked?

my doubt is that what will happen if too many else if blocks are there?

  • app being slow
  • performance issues
  • app stucks
  • slow to respond
  • build a procedure instead of when button click option
  • other information, please comment

0 voters

please reply quickly and i am sorry if there is a similar topic, search does not give proper results.

200 else/ifs is a design mistake.

Look into table lookups instead.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.