Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #455

Re: Newbie question about nested subroutines

From ralph <nt_consulting64@yahoo.net>
Newsgroups comp.lang.basic.visual.misc
Subject Re: Newbie question about nested subroutines
Date 2011-10-07 10:26 -0500
Organization Aioe.org NNTP Server
Message-ID <te5u8790j2qgugvss4tnu11ffiv0oiis6j@4ax.com> (permalink)
References <4e8df7f8$1@dnews.tpgi.com.au> <01cc847e$07167600$6d01a8c0@k8s8x> <4e8e56c9$1@dnews.tpgi.com.au> <j6lo80$9t0$1@dont-email.me> <j6mci3$qdf$1@speranza.aioe.org>

Show all headers | View raw


On Fri, 07 Oct 2011 09:17:09 +0100, Deanna Earley
<dee.earley@icode.co.uk> wrote:

>On 07/10/2011 03:28, Bob Butler wrote:
>>
>> "Dimmer" <Dimmer@Best.com> 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. <g>

-ralph

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 05:48 +1100
  Re: Newbie question about nested subroutines "Bob Butler" <bob_butler@cox.invalid> - 2011-10-06 13:54 -0700
    Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 10:39 +1100
      Re: Newbie question about nested subroutines "Bob Butler" <bob_butler@cox.invalid> - 2011-10-06 16:54 -0700
        Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 11:34 +1100
  Re: Newbie question about nested subroutines "Access Developer" <accdevel@gmail.com> - 2011-10-06 16:05 -0500
    Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 10:41 +1100
      Re: Newbie question about nested subroutines "Access Developer" <accdevel@gmail.com> - 2011-10-06 22:49 -0500
  Re: Newbie question about nested subroutines "Thorsten Albers" <gudea@gmx.de> - 2011-10-06 23:16 +0000
    Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 11:36 +1100
      Re: Newbie question about nested subroutines ralph <nt_consulting64@yahoo.net> - 2011-10-06 23:58 -0500
        MZ Tools "Dimmer" <Dimmer@Best.com> - 2011-10-08 19:37 +1100
          Re: MZ Tools ralph <nt_consulting64@yahoo.net> - 2011-10-08 10:53 -0500
    Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 12:15 +1100
    Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-07 12:32 +1100
      Re: Newbie question about nested subroutines "Bob Butler" <bob_butler@cox.invalid> - 2011-10-06 19:28 -0700
        Re: Newbie question about nested subroutines Deanna Earley <dee.earley@icode.co.uk> - 2011-10-07 09:17 +0100
          Re: Newbie question about nested subroutines ralph <nt_consulting64@yahoo.net> - 2011-10-07 10:26 -0500
            Re: Newbie question about nested subroutines Deanna Earley <dee.earley@icode.co.uk> - 2011-10-07 17:34 +0100
              Re: Newbie question about nested subroutines Deanna Earley <dee.earley@icode.co.uk> - 2011-10-07 17:37 +0100
              Re: Newbie question about nested subroutines ralph <nt_consulting64@yahoo.net> - 2011-10-07 12:04 -0500
            Re: Newbie question about nested subroutines "Dimmer" <Dimmer@Best.com> - 2011-10-08 05:32 +1100
              Re: Newbie question about nested subroutines ralph <nt_consulting64@yahoo.net> - 2011-10-07 14:30 -0500

csiph-web