Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2
This is the forum to discuss the Wrox book Excel 2007 VBA Programmer's Reference by John Green, Stephen Bullen, Rob Bovey, Michael Alexander; ISBN: 9780470046432
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2011, 08:53 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Terminology

Hi there,

I´m a newbie (at the forum and at VBA), so here goes a, perhaps, silly question.

What's the difference between an "argument" and a "parameter", if any?

It seems to me the authors use both words as synonyms throughout the book.

However, it should be pointed out that on page XXV, they make an explicit distinction, to wit:

"The VBE provides users with much more help than was previously available. For example, as you write code, pop-ups appear with lists of appropriate methods and properties for objects, and arguments and parameter values for functions and methods."

Tks.

Al
 
Old October 8th, 2011, 09:01 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I´ve just googled that question and found several explanations.

It looks like "parameter" refers to the logical structure of a procedure (and, perhaps, a method), and that "argument" refers to the value taken by a given "parameter".

Did I get it right?

Tks.
 
Old October 8th, 2011, 11:01 AM
Friend of Wrox
Points: 689, Level: 9
Points: 689, Level: 9 Points: 689, Level: 9 Points: 689, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2010
Posts: 171
Thanks: 0
Thanked 14 Times in 14 Posts
Default

they basically mean the same thing, at least virtually all the time.

different programming languages use different terminology. I'm a bit rusty with VBA terminology, but the two in question would be Subroutines and Functions.

here's a subroutine (that does nothing useful):

Code:
Sub AddTwoNumbers(Number1 As Integer, Number2 As Integer)

    Dim Result As Integer
    
    Result = Number1 + Number2

End Sub
i think, technically, you got it spot on, but in reality, they are used interchangeably. Number1 and Number2 are the parameters for the above subroutine. If you see "argument", just keep in mind that it's just "stuff" (integers, strings, the list can get really long) passed to a sub or function.

Don't worry too much about that "method signature" stuff you may have encountered in your google search. It will never come up in VBA, though being a professor, if you're curious, a method signature refers only to the return type and parameter types of a function/sub. For example:

Code:
Function Example(Words As String, SomeObject As WorksheetFunction, SomeRange As Range, SomeNumber As Long) As Boolean
    Example = True
End Function
the method signature of the above function would be:

String, WorksheetFunction, Range, Long as Boolean

method signatures have to do with concepts foreign to VBA such as overloading, delegates, anonymous types, and no, i'm not explaining those, lol.

i've learned a lot from people who have freely shared their knowledge online, in appreciation, i try to give back. So if you have other questions, post to this forum, it should be a while before you continuously stump me for answers.

good luck on your journey into the world of programming. :)

p.s. This response was written in camelCase, another term you may encounter if you end up outside the world of VBA. ;)
The Following User Says Thank You to mtranchi For This Useful Post:
Prof Alvaro Hernandez (October 10th, 2011)
 
Old May 6th, 2012, 10:42 AM
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Wink

Thanks. (Better late than never!)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusion with terminology... vb89 XML 5 May 7th, 2010 06:36 AM
Terminology? jacob C# 3 July 28th, 2005 03:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.