[Gambas-user] static const?
Jussi Lahtinen
jussi.lahtinen at ...626...
Fri Apr 16 23:37:29 CEST 2010
> (my teacher said never try to divide something by 0).
>
> And I do not understand why/what/where.... that condition is/could be
> good for ... 1/0 !?
Dividing by zero is guaranteed error. That is exactly reason why I used it to
test if Gambas has short-circuits or not.
This is for test purpose only, not for real useful code.
> but
> If 1 = 1 And 1 <> 2 Then Print "test"
> and
> If 1 = 1 And If 1 <> 2 Then Print "test"
This doesn't test for short-circuits, because both of them will print "test".
No indication.
My code;
If 1 = 2 And If 1 / 0 Then Print "test"
does not create error IF language is short-circuit capable,
because execute of statement will stop at 1 = 2.
Jussi
More information about the User
mailing list