• Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Members
  • Team
  • Help
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Members Team Help
    Tendo City Tendo City: Metropolitan District Ramble City The Daily WTF

     
    • 0 Vote(s) - 0 Average
    The Daily WTF
    Dark Jaguar
    Offline

    Administrator

    Posts: 19,628
    Threads: 1,572
    Joined: 10-12-1999
    #4
    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.)
    "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)
    Reply
    Reply
    « Next Oldest | Next Newest »

    Users browsing this thread:



    Messages In This Thread
    The Daily WTF - by Dark Jaguar - 10th July 2006, 1:07 PM
    The Daily WTF - by etoven - 10th July 2006, 2:20 PM
    The Daily WTF - by Weltall - 10th July 2006, 5:52 PM
    The Daily WTF - by Dark Jaguar - 10th July 2006, 6:03 PM
    The Daily WTF - by Weltall - 10th July 2006, 6:31 PM
    The Daily WTF - by Dark Jaguar - 10th July 2006, 6:38 PM
    The Daily WTF - by etoven - 10th July 2006, 7:01 PM
    The Daily WTF - by lazyfatbum - 10th July 2006, 8:25 PM
    The Daily WTF - by Private Hudson - 12th July 2006, 3:41 AM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Toven Solutions

    Home · Members · Team · Help · Contact

    408 Chapman St. Salem, Viriginia

    +1 540 4276896

    etoven@gmail.com

    About the company Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Linear Mode
    Threaded Mode