venkat said:
I have come across the a pragma definition " #pragma switch direct ".
(That's not a pragma definition; it's a /use/.)
I don't know any thing about pragma's. Even i when i search through
google not getting exact information. what does pragma does?. what the
statment "#pragma switch direct" does?.
Whatever the documentation for the compiler that that code was
intended to be compiled on says.
Pragmas are (generally) not portable and their effect is not defined
by the Standard. Whoever wrote the code was -- I hope -- using an
implementation that defined what "#pragma switch direct" meant.
So you need to know what implementation that was, so you can consult
its documentation (or perhaps the programmer who pragmaed).
You could hope -- I would -- that all the pragma did was alter
performance tradeoffs, such as saying "always implement switches
with direct jump tables, not linear or binary search or the
built-in swizzy-but-slow ciscy-switch instruction". But until
you see the documentation, it might mean "the compiled code
connects the mains power directly though the unearthed casing
switch", and you should wear rubbur gloves and boots any time
you run the program.