Announcement

Collapse
No announcement yet.

Quick Function Syntax Question (PB Specific)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick Function Syntax Question (PB Specific)

    Quick Question, I hadn't seen this Syntax in VB so I thought I'd check.
    Using the Function name or "Function" as the return parameter.

    Is this:

    Code:
    Function MyFunct(Param1 as long, Param2 as long) as Long
        ' Do Some Stuff
        Function = 1
    End Function
    The same as this?
    Code:
    Function MyFunct(Param1 as long, Param2 as long) as Long
        ' Do Some Stuff
        MyFunct = 1
    End Function
    Never seen "Function = x" before now

    Cheers

    ------------------

    Paul Dwyer
    Network Engineer
    Aussie in Tokyo
    (Paul282 at VB-World)

    [This message has been edited by Paul Dwyer (edited January 30, 2001).]

  • #2
    It is the same thing....

    Regards
    Peter

    ------------------
    [email protected]
    www.dreammodel.dk

    Comment


    • #3
      Paul,

      This has been standard "Basic" syntax for a long time. Just
      like Peter said, "same thing".

      Cheers,
      Cecil

      ------------------

      Comment


      • #4
        Thanks,

        Never seen it in VB or C, and when I used qbasic we used gosubs, that's all.

        Much the wiser now



        ------------------

        Paul Dwyer
        Network Engineer
        Aussie in Tokyo
        (Paul282 at VB-World)

        Comment


        • #5
          It may work the same, but I think MyFunct=returnvalue is more
          readable, so I vote (a very semantic) not the same.

          ------------------
          Thanks,

          John Kovacich
          Thanks,

          John Kovacich
          Ivory Tower Software

          Comment

          Working...
          X