From: "Dimmer" Newsgroups: comp.lang.basic.visual.misc References: <4e8df7f8$1@dnews.tpgi.com.au> <01cc847e$07167600$6d01a8c0@k8s8x> <4e8e56c9$1@dnews.tpgi.com.au> Subject: Re: Newbie question about nested subroutines Date: Sat, 8 Oct 2011 05:32:49 +1100 Lines: 46 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 NNTP-Posting-Host: 203.219.176.51 X-Original-NNTP-Posting-Host: 203.219.176.51 Message-ID: <4e8f45dc@dnews.tpgi.com.au> X-Trace: dnews.tpgi.com.au!tpg.com.au 1318012380 203.219.176.51 (8 Oct 2011 05:33:00 +1000) Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feed.news.qwest.net!mpls-nntp-08.inet.qwest.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.basic.visual.misc:459 "ralph" wrote in message news:te5u8790j2qgugvss4tnu11ffiv0oiis6j@4ax.com... > On Fri, 07 Oct 2011 09:17:09 +0100, Deanna Earley > wrote: > >>On 07/10/2011 03:28, Bob Butler wrote: >>> >>> "Dimmer" wrote in message >>> news:4e8e56c9$1@dnews.tpgi.com.au... >>>> Also Bob, I have found out that if I use the word CALL it is OK as >>>> long as the arguments are in brackets. Without CALL as in your example >>>> also works but then brackets must not be used. I imagine that the two >>>> syntaxes are optional? >>> >>> Correct >>> >>> Call procedurename(argumentlist) >>> -or- >>> procedurename argumentlist >> >>And just a warning that while mixing them is syntactically valid for one >>parameter, it does NOT always do what you expect and will catch you out >>with a bug at some point: >>procedurename (argument) >> >>It evaluates 'argument', which for objects, gets the default property, >>and other types, converts to a variant with an implicit byval. > > Always a good warning. > > Procedurename argument > is not semantically the same as > Procedurename (argument) > > However, I disagree with the characterization that it is a 'bug' or > that the results should even be 'unexpected'. The grammatic rules for > calling VB procedures and using parathentheses are very clear. If one > doesn't follow the rules then surprises are to be expected. > > -ralph My instinct is to use eg Call Bloggs(Arguments...) as it is clearer when reading the code (well I think so anyway) so presumably that's OK?