Hello, I have a general question about the if...else statement:
What is generally considered good practice, to put the most frequently occurring conditions in the beginning, and less frequent towards the end, or is there no such preference?
Just as an example, suppose client #10 has 100 ships, and client #20 has 120 ships, but clients #30, #40, #50, and #60 have 23, 12, 45, and 67 ships respectively.
In this case, should I write my statement like this:
if custno in (10,20) then
-- some code for hundreds of ships, different logic for each ship, potentially a lot of code
elsif custno in (60) then
-- some code for <100 ships
else
-- some code for <50 ships
end if;
or should I "do as I please" regardless of how often an event occurs, e.g.
if custno in (30,40,50) then
-- some code for some ships
elsif custno in (60) then
-- some code for some ships
else
-- some code for some ships
end if;
Hope I explained this clearly.
Thank you.