> A more informative error mesage might help --- from a user's point of view,
> variable 'b' has been initialized before it is used.
I would second that.
> In fact, the above
> b:bat[:int,:int] := bbp.bind("test");
> is wrong --- or at least implies a silent cast from :oid to :int of the
> BAT's head --- since bind returns a bat[:oid,:any_1], i.e., only the tail
> type is "unknown" or "generic".
The type system seems to think that b is b:any and not b:bat[:any_1,:any_2].
When I do this:
mal>n := bat.new(:void,:str);
mal>bat.setName(n, "person_name");
mal>bat.setPersistent(n, true);
mal>transaction.commit();
mal>\q
then come back to bind person_name like this:
mal>pn := bbp.bind("person_name");
mal>i := bat.info(pn);
MAPI = [EMAIL PROTECTED]:50000
QUERY = i := bat.info(pn);
ERROR = !TypeException:user.main[1]:'bat.info' undefined in: i:any :=
bat.info(pn:any)
!TypeException:user.main[1]:'pn' may not be used before being
initialized
the first error message sounds like the 'function dispatch mechanism'
(whatever that might be) was searching for a function bat.info(pn:any)
and didn't find it.
Looking into the code, I see something which could possibly match in
function typeChecker (MonetDB5-server/MonetDB5/src/mal/mal_resolve.mx
line 644).
So, bbp.bind(:str) didn't assign a bat to pn?
Is there a way in mal to output the type of a variable?
Thanks
Kambiz
-------------------------------------------------------------------------
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