> Code:
> ' Gambas module file
> 
> PUBLIC SUB Main()
>   PRINT F1()
>   PRINT F2()
>   PRINT "END"
> END
> 
> SUB F1() AS Integer
>   PRINT "F1"
>   FINALLY
>     PRINT "F1-FIANLLY"
> END
> 
> SUB F2() AS Integer
>   PRINT "F2"
>   RETURN 2
>   FINALLY
>     PRINT "F2-FIANLLY"
> END
> 
> Output:
> F1
> F1-FINALLY
> 0
> F2
> 2
> END
> 
>  bug or a feature?
> 

Feature ! RETURN is stronger than anything. You must put it inside the FINALLY 
block.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to