Is it possible to call a VB function without the parenthesis?

前端 未结 4 425
-上瘾入骨i
-上瘾入骨i 2021-01-03 07:17

I am looking at VB6 code and I see a statement as follows -

       Public Sub CheckXYZ(abc As Integer)

       If abc <> pqr Then SetVars abc
<         


        
4条回答
  •  南笙
    南笙 (楼主)
    2021-01-03 08:18

    I don't personally use or recommend the use of the Call statement. I find personally that the parens with functions and lack thereof with subs differentiate the two effectively. That said, I really like Matt's use of the call statement/byval/double parens. In the rare circumstances when you want this, it makes it stand out even MORE from every other call if it's the only place where you use the Call statement. I'm gonna use that, if I live long enough to need to. :)

提交回复
热议问题