Jump to content

Function Overloading


Recommended Posts

I couldn't find any information on overloading function with different parameter signatures so I figured I would ask if it was possible. 

For example

Func AddStuff($a)
    ;overloads AddStuff($a, $b, $c) Same function name but different param signature overloads
    Return MyFunc($a, 0, 0)
End Func

Func AddStuff($a, $b)
    ;overloads AddStuff($a, $b, $c) Same function name but different param signature overloads
    Return MyFunc($a, $b, 0)
End Func

Func AddStuff($a, $b, $c)
    ;Work is done in primary function
    Return $d = $a + $b + $c
End Func
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...