10th July 2006, 6:03 PM
I'll try to break it down. The first example shows two functions being created. They are for determining even numbers and odd numbers. Without going into further detail, the first thing you should be aware of is that compilers (programs that write other programs) as a general rule already have such functions built in, and are more efficiently done at that which can be called with a simple statement. Declaring these functions is pointless, reinventing the wheel, only it's an oval.
(There are other major issues, for example whether or not the function adequatly handles integers of various sizes and how it corrects for incorrect data types and so on and so forth which the built in function can generally be expected to already be optimized to deal with.)
(There are other major issues, for example whether or not the function adequatly handles integers of various sizes and how it corrects for incorrect data types and so on and so forth which the built in function can generally be expected to already be optimized to deal with.)
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." ~ Charles Babbage (1791-1871)