Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Short-Circuiting with Logical Operators
Message
De
28/10/2014 06:25:46
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
28/10/2014 03:46:28
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:
01610010
Vues:
54
>>Procedure call:
>>
>>DO blabla
>>
>>
>>function call
>>
>>blabla()
>>
>>
>>if you define
>>
>>
>>PROCEDURE blabla
>>
>>or
>>
>>FUNCTION blabla
>>
>>
>>does not mean a bit
>>
>I know that - but that was only used to show the short-circuiting
>
>And both functions return true in this case

Only if called as a function. If called as a procedure they return nothing.

So. If you need a RETURN use the call in function style. Then a perfect designed function should do nothing more. To change parameters is normaly o.k.

If the subroutine should do more then to produce a return value (the side effect is important) it should be called in the procedure style.

But this is all should bubble - I never use DO except in rare cases where I need DO .. IN ..

:D

Lutz
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