Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
If statement with 23 conditions
Message
De
17/01/2006 17:58:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
17/01/2006 11:58:51
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01087587
Message ID:
01087766
Vues:
12
>Hello,
>I am about to write an ugly IF statement with 23 conditions. What is the best syntax to do this so I don't have one huge IF line. I would like it to be readable without having to scroll a mile to the right.
>
>
>IF CONDITION1 = RESULT1 AND CONDITION2 = RESULT2 AND CONDITION3 = RESULT3...
>     lcReturn = .T.
>Else
>     lcReturn = .F.
>ENDIF
>
return ;
 m.CONDITION1 = m.RESULT1 AND ;
 m.CONDITION2 = m.RESULT2 AND ;
 m.CONDITION3 = m.RESULT3...
Probably it would much shorter based on original code.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform