[Gambas-user] Convertion bug or problemm undestood !!!
Benoit Minisini
gambas at ...1...
Tue Nov 11 20:27:22 CET 2003
Le Mardi 11 Novembre 2003 17:40, Olivier Coquet a écrit :
> Le Mardi 11 Novembre 2003 14:27, Benoit Minisini a écrit :
> > Why are you afraid when the interpreter raise errors ?
> >
> > Regards,
>
> Because it's not possible to have a good gestion on error, if i use CATCH
> all errors are catched and it's not my goal.
>
> if the function return me an empty string I can Act with another code to
> correct this problem durring execution without brocking my code.
>
> Regards
> Olivier
>
If you want this behaviour, you can do something like that:
DIM vVal AS Variant
DIM sData AS String
' If the following statement fails, then vVal will keep its default value
' that is NULL
TRY vVal = Val(sData)
RETURN vVal
I know that this is not the standard Basic behaviour, but Gambas ALMOST means
Basic! :-)
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list