Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
=execute syntax
Message
De
26/10/1998 00:51:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00150352
Message ID:
00150389
Vues:
14
>...syntax and use of "=execute" i.e. do =execute{"blah.spx")
function execute
lparameters tcProgName
do (tcProgName)
But what will be the use of such a function. I would simply directly "do blah.spx". "=" is not the execute but assign operator. When you don't need the return value of a function you simply write :
=myfunc()
* Which is equivalant
do myfunc
* So what's the difference =myfunc() and do myfunc
* when it has parameters there is an obvious difference
x=5
=myfunc(x)  && Parameter passed by val
? x  && 5
* vs do
x=5
do myfunc with x   && Parameter passed by ref
? x  && 10
* This one would also match do version
x=5
=myfunc(@x)  && Parameter passed by ref
? x  && 10

function myfunc
parameters tnNumber
tnNumber = tnNumber * 2
return
With VFP in most situations you don't even need to use "=" operator.
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