Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which Should I Use IF/ENDIF or IIF
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00668532
Message ID:
00668678
Vues:
17
>Sergey;
>
>I think all code should be contained on one line - it runs faster. My goal is to write a complete application on one row. Think of the speed! :)


At some point, under influence of the C book I read at that time, I wrote code like that
llOk = Func1() And func(2) And (Func3) ... and so on
Not very readable but compact. :)

>In real life I will normally use structured code for readability and sometimes IIF statements when needed. Some IIF statements can be complex to understand.

The same here. If I've a choice between IIF() and IF I would use IIF() only if condition is simple and there could be multiple separate squential statements with IIF()'s. In this case code would be more readable with IIF() because of it compactness.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform