In fact, your code is okay, but when creating an instance of a class without arguments you need too skip the parenthesis. -----Original Message----- From: laurent bernabe <laurent.bern...@gmail.com> Date: Thu, 22 Nov 2012 18:42:41 To: mailing list for gambas users<gambas-user@lists.sourceforge.net> Reply-To: mailing list for gambas users <gambas-user@lists.sourceforge.net> Subject: [Gambas-user] Having an overidden class constructor
Hello, I am coding a Vector3f class (representing a Mathematical vector), and I would like that instances of this class can be made from two ways : - either by calling New Vector3f() for a vector located at the origin (0,0,0) - or by supplying 3 arguments, such as with New Vector3f(1,2,-3) In my source file (Vector3f.class) : I designed the _new procedure by giving 3 optionnal float. But when I call (In MMain.module) New Vector3f(), I get the error "Unexpected ')' at line 20". So, did I misunderstand optionnal parameters ? Thank in advance ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user