Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-28 Thread Richard Hipp
On 2/28/19, Jean-Baptiste Gardette wrote: > > PS : on wich OS did you run the test script ? > (the different outputs between the two computers gives > unconfortable feeling) > Linux -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Sorry for my late reply. Yes, your proposal would definitively solve our problem. (our Tcl dictionnaries are allways filled with values sharing the same type) PS : on wich OS did you run the test script ? (the different outputs between the two computers gives unconfortable feeling)

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Richard Hipp
On 2/27/19, Peter da Silva wrote: > One nasty thing you might be able to do in the interim is to shimmer the > object to the type you want by doing something like [set x [expr {double > $x}]] to make it double. The new optional -returntype TYPE option is now available on the SQLite trunk. The

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Peter da Silva
One nasty thing you might be able to do in the interim is to shimmer the object to the type you want by doing something like [set x [expr {double $x}]] to make it double. On Wed, Feb 27, 2019 at 9:31 AM Richard Hipp wrote: > On 2/27/19, Jean-Baptiste Gardette wrote: > > have you any

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Richard Hipp
On 2/27/19, Jean-Baptiste Gardette wrote: > have you any explanation why the typof() output of > "SELECT DerefDict_SQL('A'), typeof(DerefDict_SQL('A'))" > gives "text" in Sequence A and "real" in Sequence B ? > No. The code that determines the return type of a TCL UDF is here:

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Le 27/02/2019 à 14:55, Richard Hipp a écrit : On 2/27/19, Richard Hipp wrote: The modified script can be downloaded from https://sqlite.orge/tmp/tcl-sqlite-testcase-20190227125331.txt Typo: "sqlite.org", not "sqlite.orge".

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Richard Hipp
On 2/27/19, Richard Hipp wrote: > The modified script can be downloaded from > > https://sqlite.orge/tmp/tcl-sqlite-testcase-20190227125331.txt > Typo: "sqlite.org", not "sqlite.orge". https://sqlite.org/tmp/tcl-sqlite-testcase-20190227125331.txt -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Richard Hipp
On 2/26/19, Jean-Baptiste Gardette wrote: > the type of a value returned by one UDF > dereferencing a tcl dictionnary : the type is changing depending from > the context. I am unable to reproduce the behavior you observe. I did a copy/paste of your script with simple changes: (1) The "#

[sqlite] Confused with type mismatch in Tcl interface

2019-02-27 Thread Jean-Baptiste Gardette
Win 7, SQLite 3.24.0, Tcl 8.6.9 We don't know if it is a problem about SQLite or Tcl, apologies if it is the wrong list. Our main concern is the type of a value returned by one UDF dereferencing a tcl dictionnary : the type is changing depending from the context. We observed that a