[Gambas-user] When you use RETURN the FINALLY block not start

2010-04-25 Thread sviroos
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?

Re: [Gambas-user] When you use RETURN the FINALLY block not start

2010-04-25 Thread Benoît Minisini
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

Re: [Gambas-user] When you use RETURN the FINALLY block not start

2010-04-25 Thread Jussi Lahtinen
Little bit of topic but: SUB F1() AS Integer Shouldn't this be FUNCTION? I didn't know subs can return value. New to me... Jussi 2010/4/25 Benoît Minisini gam...@users.sourceforge.net: Code: ' Gambas module file PUBLIC SUB Main()   PRINT F1()   PRINT F2()   PRINT END END SUB F1() AS