Am Donnerstag, den 15.04.2010, 21:07 +0300 schrieb Jussi Lahtinen:
> Yes, you can test it.
> 
> This should generate error:
> If 1 = 2 And 1 / 0 Then Print "test"
> 
> This should not.:
> If 1 = 2 And If 1 / 0 Then Print "test"
> 
> Jussi
> 
> 
> On Thu, Apr 15, 2010 at 20:56, Charlie Reinl <karl.re...@fen-net.de> wrote:
> > Am Donnerstag, den 15.04.2010, 19:28 +0200 schrieb Doriano Blengino:
> >> Jussi Lahtinen ha scritto:
> >> >> Back to gambas - I don't know if the documentation says anything about
> >> >> short-circuit and things like that. May be we can assume it as a
> >> >> standard, that modern languages always do short-circuit, but the concept
> >> >> remains.
> >> >>
> >> >
> >> >  Gambas doesn't have short-circuits, you have to write like this:
> >> >  IF a=1 AND IF b=2 THEN
> >> >
> >> >
> >> Ah! Thanks. So, a statement like this:
> >>
> >>     if i<tabstrip1.count and tabstrip1[i].caption=""
> >>
> >> can fail, if I understand well. Perhaps I must check a few lines of code...
> >>
> >> Regards,
> >> Doriano
> >
> > Salut,
> >
> > I'v never done it like that (IF a=1 AND IF b=2 THEN), are you sure ?
> > --
> > Amicalement
> > Charlie
> >

Salut,

yes you are right for that example 

(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 !?

but 
If 1 = 1 And 1 <> 2 Then Print "test"
and
If 1 = 1 And If 1 <> 2 Then Print "test"

works the same way.
-- 
Amicalement
Charlie


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to