Am Mittwoch, den 10.10.2012, 12:59 +0200 schrieb Rolf-Werner Eilert:
> Hm! Ok, I tried both, and in THIS case here, I cannot feel any 
> difference in speed. So I stay with IIF.
> 
> Rolf
> 
> 
> Am 10.10.2012 12:47, schrieb Fabien Bodard:
> > Yes
> > Le 10 oct. 2012 12:13, "Rolf-Werner Eilert"<[email protected]>  a
> > écrit :
> >
> >> As you might guess, I managed to re-write the things with IIF like
> >>
> >> mesVon.Add(IIF(teil.Count>  1, teil[1], ""))
> >>
> >> which is even shorter than the one-liner I wanted to use first.
> >>
> >> My only worry is speed - is IIF much slower than a pure IF ELSE
> >> construction?
> >>
> >> Rolf
> >>
> >>
> >> Am 10.10.2012 10:46, schrieb Rolf-Werner Eilert:
> >>> Hi,
> >>>
> >>> just stumbled over this one:
> >>>
> >>>          IF teil.Count>   1 THEN mesVon.Add(teil[1]) ELSE mesVon.Add("")
> >>>          IF teil.Count>   2 THEN mesStatus.Add(teil[2]) ELSE
> >> mesStatus.Add("")
> >>>          IF teil.count>   3 THEN mesPri.Add(teil[3]) ELSE mesPri.Add("")
> >>>          IF teil.Count>   4 THEN mesRef.Add(teil[4]) ELSE mesRef.Add("")
> >>>          IF teil.Count>   5 THEN mesText.Add(teil[5]) ELSE
> >>> mesText.Add("Fehler: Defekte Message-Datei")
> >>>
> >>> Doesn't seem to be possible in Gambas, so I would have to write
> >>>
> >>>          IF teil.Count>   1 THEN
> >>>            mesVon.Add(teil[1])
> >>>          ELSE
> >>>            mesVon.Add("")
> >>>          END IF
> >>>
> >>> for all of the above cases - a bit roundabout and not so well readable,
> >>> isn't it?
> >>>
> >>> Regards
> >>>
> >>> Rolf
> >>>

Salut Rolf,

personally I prefer 
if ..then
... do this
else
... do that
end if 
for debugging reasons


-- 
Amicalement
Charlie


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to