Results 1 to 3 of 3

Thread: Yet another question about functions!!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Question

    I am making a calculator program and i was wondering...what would be better...storing all the operators code in a function or would putting all the operators code in the buttons themselves be the better way to go.?
    thanks.

  2. #2
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    If you have the tendency to be able to reuse the codes with new arguments or parameter, then place your operation in a function.

    However, if you are just using that piece of code only one time, then you can just stick it in your command buttons.
    Chemically Formulated As:
    Dr. Nitro

  3. #3
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Lightbulb Sample program

    It is not recommended to write fuction under the control method itself.

    For Calculator sample program, I think here Planet Source Code have a lot that you can use it as your reference.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width