Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Short-Circuiting with Logical Operators
Message
De
28/10/2014 11:37:25
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01609995
Message ID:
01610031
Vues:
43
>Lutz, while what you are saying is true, in Argentina we have a saying "Estás meando fuera del tarro" ("“You are peeing outside the jar/can”) as it has nothing to do with the thread, which is about short circuiting logical operators, nothing to do with the differences between procedure and function or parameter changing (there are no changes in the parameters in the example), that is what is startling Gregory.

Not realy

If it is important that a function returns or changes something different then its value then it's a non good design.
IOW. If a function just does what is is made for (return a value depending on it's input) no harm can be done by shortcutting.

So in the example in the OT the print of something is simple a sideefect a functiion is (general speaking) not made for.

[eg]
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform