| To: | Getting Started <gettingstarted at lists dot realsoftware dot com> |
|---|---|
| Subject: | Passing optional arguments |
| From: | Paul Rehill <paul dot rehill at gmail dot com> |
| Date: | Sat, 26 Feb 2005 08:36:25 +1100 |
| Delivered-to: | gettingstarted at lists dot realsoftware dot com |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=DFd+q9s8v0/C4PuKOF74Vu7XCmL8FI9c31PjsfmQmi1apOX3vj134zm7ewBntO5WJsE6NZYWKUjpejhMt4TPQtQOrPD3wEISPeHEIyIGi8nN+CKdItSUsE6Li0DFEGLLrZK+nlGCBL8Fd2eEo/+GnxuYuX5xuiSHW/AynJOJlsY= |
Hi I am wondering if I can call a method that has optional arguments without referring to all of the arguments' default values. E.g If the method is defined as ExMethod1(Num1 As Integer = 5, Num2 As Integer = 4, Num3 As Integer = 3, Num4 As Integer = 2, Num5 As Integer = 1) and I want to just pass 10 into Num5 in VBA I can use ExMethod1 Num5:=10 At the moment in RB I am writing ExMethod1 5, 4, 3, 2, 10 as I am unaware of a shortcut. Is there a shorthand way of calling a method with only some of the optional arguments explicitly mentioned. Thanks in advance Paul Rehill mathsteacher.com.au paul dot rehill at gmail dot com; paul dot rehill at mathsteacher dot com dot au _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://www.realsoftware.com/listarchives/lists.html> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Newbie trouble, Terry Ford |
|---|---|
| Next by Date: | Re: Passing optional arguments, Joseph J. Strout |
| Previous by Thread: | Handling OutOfBoundsException, Paul Young |
| Next by Thread: | Re: Passing optional arguments, Joseph J. Strout |
| Indexes: | [Date] [Thread] [Top] [All Lists] |