[Gambas-user] Val function changed behaviour, porting gambas2 to gambas3

Fabien Bodard gambas.fr at ...626...
Thu Nov 3 09:59:05 CET 2016


>
> No problem, Benoit, I see the advantages. After all, my problem was due
> to sloppy programming... ;)
>
> But in BASIC, one is used to everything being converted from one format
> to another without raising an error that can stop the program. So in
> normal BASIC thinking, if val() cannot find a value in a string, it
> would be expected to send "0", though it isn't fully logical I have to
> admit. In the scope of my programming, this would do the job. Maybe I
> should make my own Val()...
>
> Regards
> Rolf
>


Val() return Null because 0 is a valid result. So with Null we know
that the converting fail.

Regards
-- 
Fabien Bodard




More information about the User mailing list