In the last episode (Sep 13), d e l d h a n o a said:
> Do switch statements run any faster than if/else statements?
Depending on your switch statement and how many cases, gcc will
optimize it to either a set if if/elses or use a lookup table.
> What are the pros and cons for each? I intend to use the switch
> statement for the type of search the user wants for a search engine
> that I am creating. It is like hotbot where the user can choose AND,
> OR and EXACT types of searches. The switch/case format would do the
> type of search depending on the user's choice. Would an if/else be
> more beneficial for this?
Switch values have to be constants, and can't be strings. Efficiency
here doesn't really matter, since the majority of the time will be
spent waiting for data from mysql anyway..
> ps- why can't the mailing list admin put a [mySQL] in the subject of
> each mail? just wondering....
Because it wastes 8 characters in the subject line of every message.
Simply filter list posts into another folder (filter on Delivered-To:).
This has been discussed to death before and it not likely to change.
--
Dan Nelson
dnelson@stripped