[Gambas-user] Gambas has Gosub now!
Benoît Minisini
gambas at ...1...
Thu Aug 9 03:33:17 CEST 2012
Le 05/08/2012 18:33, Emil Lenngren a écrit :
> If there is a pending gosub + a catch, the gosub things on the stack are
> erased, so when returning back, invalid values are copied from the stack.
>
> So at stack unwinding, the gosub slots must be kept.
>
> This crashes the interpreter now (or puts it in an infinite loop):
>
> Public Sub Main()
>
> Dim i As Integer
> With [1]
> For i = 1 To 2
> GoSub lbl
> Next
> End With
>
> Return
>
> lbl:
> Error.Raise("Hello")
>
> Catch
> Print "catching";; Error.Text
> Return
>
> End
>
It should be fixed in revision #5020.
Regards,
--
Benoît Minisini
More information about the User
mailing list