|
-
Jan 3rd, 2011, 07:03 PM
#3
Re: What is the purpose of Parameters
 Originally Posted by Sellion
Sorry, I'm kind of new to programming but something I am having difficulty understanding is parameters. What are they and when are they used? I saw some examples of parameters and I noticed that they are similar to variables. What is the difference between a parameter and a variable? Since I'm a beginner, it would be nice if anyone could explain this in simple terms.
Parameters are variables that you pass to functions. The advantage to using parameters instead of global variables is that parameters make your functions more generic, which makes them more easily copied from project to project.
In buzzword-speak, parameters can be viewed as a primitive form of encapsulation that increases the reusability of your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|