h1

the truth about arguments

February 24, 2007

An argument can sometimes get nasty. When your trying to get your point across, sometimes feelings get hurt. This can be especially true if you get really emotional about it and start naming your variables illogical names.

Arguments (in programming of course, also known as parameters) are “passed” as inputs into functions. They basically help functions do their job. Without this independent variable, a function is pretty much all looks. Don’t get me wrong, functions really don’t need inputs, but it does put the fun in function. (OK, that was bad. Sorry)

Think about an argument like a debit card, no matter which card goes into an ATM (function), the same thing is gonna happen; you put your card in, type your pin and then have access to an account.

In order to get what you want (a specific database value, a simple arithmetic calculation, validation of a form input explicitly accepting numerical values from 0-9 that are no more then 5 characters long!) –first get to know how your argument needs to be (datatype, size, etc), then work with it.

Advertisements

2 comments

  1. […] sure your passing the right arguments. Check out what’s being passed by printing the value on the screen. This way you are working […]


  2. Digital Photography

    hey good stuff



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: