I didn't mean that.
Cint("0") will return 0 as expected, but cint("blaablaa") returns confusing
error message.
I think instead there should be something like "Conversion error from
String to Integer".
But maybe that is not that big problem, even though it is not really type
mismatch (variable type
It's the same in VB. If you run CInt("some string") you get the same error
message. I think it's better to throw an error message rather than
returning 0 or something...
/Emil
2012/11/3 Jussi Lahtinen
> > First, a void string has never been a number.
> >
>
> Yes, but, why "Type mismatch: wanted
> First, a void string has never been a number.
>
Yes, but, why "Type mismatch: wanted Integer, got String instead"?
"0" is also *string* and it is accepted.
Also booleans are accepted and interpreted as False = 0, True = -1, which
is not the way Boolean algebra works.
But that is OK, because it
Le 03/11/2012 16:24, Jussi Lahtinen a écrit :
> If I remember correctly this has been topic earlier... Was there some
> reason why Null is not accepted..?
>
> ? cint("0")
> 0
> ? cint("")
> Type mismatch: wanted Integer, got String instead
>
> At least error message is wrong (expected is variant).
If I remember correctly this has been topic earlier... Was there some
reason why Null is not accepted..?
? cint("0")
0
? cint("")
Type mismatch: wanted Integer, got String instead
At least error message is wrong (expected is variant).
And I expect it to return zero.
? val("&H123123")
1192227
?
On Sat, 2012-11-03 at 05:07 -0700, abbat wrote:
>
> Hi,
>
> How to create request SUM
>
> $Query = "SELECT Phones"
> $Phone = $Result!Phone - works
>
>
>
> $Query = "SELECT Sum(Column)"
>
> $Sum =$Result!" Sum(Column)" - not works
> $Sum =$Result!Sum(Column) - not works
>
> Thanks
>
W
Hi,
How to create request SUM
$Query = "SELECT Phones"
$Phone = $Result!Phone - works
$Query = "SELECT Sum(Column)"
$Sum =$Result!" Sum(Column)" - not works
$Sum =$Result!Sum(Column) - not works
Thanks
--
View this message in context:
http://old.nabble.com/MySQL%2C-%24Query-%3D-%22SE