Subject: methods with different return types From: Jan Erik Mostr?m <[EMAIL PROTECTED]> Date: Tue, 22 Aug 2006 18:18:24 +0200 I was playing around a bit and I'm glad to say that I can defined methods l= ike this: Sub set(name as String, assigns value as String) Sub set(name as String, assigns value as Integer) =46unction get(name as String) As String =46unction get(name as String) As Integer but then I run into trouble when I want to use them dim i as Integer dim s as String =20 p.set("hello") =3D 5 p.set("piff") =3D "Hejsan" That works just fine, but unfortunately this doesn't work i =3D p.get("hello") s =3D p.get("piff") I get a message like this for each of the last two lines "There are several items with this name and it is not clear which one the call refers to". Is there some way I can get RB to recognize that the expected return type? = Is there some way I can get this to work?
Use and return a variant ? _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
