But then I don't understand why "Finally" exist...
At least that test function is equal without it.
Is there proper usage for it, or is it for historical etc reasons?

BTW. You didn't get errors from any date commands?
Nor crash from line 1038 of mTest?
I'll send logs about that crash later.

Jussi



2010/11/15 Benoît Minisini <[email protected]>

> > More...
> >
> > Shouldn't Finally to be read after Catch, not before?
> > Now I get:
> > TestErrorManagment(1) = 1  <-- Catch is never read!
> > TestErrorManagment(2) = 21
> >
> > I exepected;
> > TestErrorManagment(1) = 4
> > TestErrorManagment(2) = 21
> >
> > Right now word Finally doesn't do anything.
> >
> >
> > Private Function TestErrorManagment(iWhich As Integer) As Integer
> > Dim iError As Integer
> >
> >   If iWhich = 1 Then
> >    iError = 1 / 0
> >   Else
> >    iError = 20
> >   Endif
> >
> > Finally
> > Inc iError
> > Return iError
> >
> > Catch
> > iError = 3
> >
> > End
> >
> >
> > Jussi
> >
>
> 'Finally' is always run before 'Catch'. And the Return statement prevents
> the
> 'Catch' part to be executed after the 'Finally' part.
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Centralized Desktop Delivery: Dell and VMware Reference Architecture
> Simplifying enterprise desktop deployment and management using
> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> client virtualization framework. Read more!
> http://p.sf.net/sfu/dell-eql-dev2dev
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to