Guest Py7|-|[]/\/ Posted December 8, 2004 Share Posted December 8, 2004 In Java it is possible to overload methods. Ex: public int numbers(String name, int testing) public int numbers(String name, int testing, int formal) Is this possible in AutoIt? And also, how would it be possible to call a specific function if it is overloaded? Link to comment Share on other sites More sharing options...
CyberSlug Posted December 8, 2004 Share Posted December 8, 2004 The closest match is optional parameters in the newest beta. Here's an example: My_WinActivate("TitleZero") My_WinActivate("TitleOne", "TextOne") Exit ;For example only; it's not that useful Func My_WinActivate($title, $text = "") If @NumParams = 1 Then Return WinActivate($title) Else Return WinActivate($title, $text) EndFunc EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valik Posted December 8, 2004 Share Posted December 8, 2004 Java is also a typed language, where-as AutoIt is not, so its completely unnecessary to be able to overload a function. If its imperative you do different things based on the contents of a variable, then use the StringIs* functions. Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted December 9, 2004 Share Posted December 9, 2004 Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now