Closed Thread
Results 1 to 2 of 2

Thread: Value/Var Parameters Help

  1. #1
    2710 is offline Programmer
    Join Date
    Sep 2008
    Posts
    108
    Rep Power
    0

    Value/Var Parameters Help

    Hi,

    I just want someone to explain Value and Variable Parameters to me in english. Its just that, no matter how I try to learn them, they confuse me and will always be in the dodgy end unless someone explains it proper. So here's my understanding so far:

    Value parameters. They call the procedure, and the procdeure is carried out, but the data is not sent back to the source. Something like that

    Variable Parameters, is the same as above, but the data is sent back and overwrites the previous data.

    Can someone giv an example as to when Value and Variable are used that distinguished their features? As in, when is 'not returning' the data a good idea? And when is it not?

    Thanks

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Value/Var Parameters Help

    Variable is useful for doing things like sorting an array. You want to return the results of sorting.

    Value is useful when you will have to manipulate the local copy to implement your logic, but don't want to risk screwing up the original. Generally, I recommend you use Value unless you explicitly intend to manipulate one of the variables you are passing.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can conditions be parameters?
    By TCristoforo in forum C and C++
    Replies: 2
    Last Post: 08-30-2010, 10:28 PM
  2. URL Parameters using / instead of ?
    By linuxprogramming4ever in forum PHP Development
    Replies: 6
    Last Post: 11-29-2009, 05:00 PM
  3. Passing Parameters
    By Alex_j in forum C# Programming
    Replies: 5
    Last Post: 11-24-2009, 04:18 AM
  4. SQL - Using parameters
    By reachpradeep in forum Database & Database Programming
    Replies: 0
    Last Post: 03-05-2007, 05:15 AM
  5. Executable with parameters
    By Chan in forum C# Programming
    Replies: 4
    Last Post: 08-07-2006, 05:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

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