Am 02.11.2016 17:16, schrieb Benoît Minisini:
> Le 02/11/2016 à 16:49, Rolf-Werner Eilert a écrit :
>> The new behaviour of val() drove me nuts when it appeared first ;) I had
>> used it in so many places, and all over my code. Sometimes it lasts for
>> weeks until your program hits this place, and AGAIN val() Arrgh... :)
>>
>> So in most cases, I ended up either checking for null before (somewhat
>> roundabout) or just using CInt() instead.
>>
>> Regards
>> Rolf
>>
> This change was needed, because Val() now takes thousand separators into
> account, and some language uses spaces for that.
>
> Regards,
>

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


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to