Jump to content

Nesting CASE in IF ( or ) Nesting IF in CASE

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
pino

pino

    Newbie

  • Members
  • Pip
  • 4 posts
Nesting CASE in IF ( or ) Nesting IF in CASE

Does anybody knows some theoretical info on the problem when I have CASE and IF but I don't know what to check first. Should I first make CASE statement, and then in every CASE a lot of IF's or the second approach: first IF and then CASE?

How to decide when to do what?

#2
jireh

jireh

    Newbie

  • Members
  • PipPip
  • 18 posts
It depends upon the situation.... they all work the same but if you want a short code then use CASE rather than IF.

A good practice of progamming is to make your code short which works equivalent to other's long code... lol