On 15-11-2007 09:55:33 +0100, Martin Kersten wrote: > > The observation is that you cannot reuse variables, unless you want to > > reuse them for something which has exactly the same type. The > > assignment makes that counter intuitive, because it /does/ work when the > > variable has never been referenced before. > > > The orginal example showed that the variable was already declared, i.e. > type was frozen. > mal> s := bat.new(:void,:oid); > mal> bat.setName(s, "schema"); > mal> bat.setPersistent(s); > mal> > mal> s := bat.new(:void,:void); > mal> bat.setName(s, "version"); > mal> bat.setPersistent(s);
Which is my point. The first assignment to s succeeds, while the type must mismatch, because it is still unknown, while the second assignment fails. I would expect either this: declare s[:void,:oid]; s := bat.new(:void,:oid) or both assignments to succeed. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Monetdb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
