Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simply Amazed
Message
De
18/07/1996 06:29:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00004015
Message ID:
00004148
Vues:
34
>REAL? ... well, then i will try to convince myself (and fox) that the sintax errors displayed when calling a method like a procedure instead of like a function doesn't exist :)
>

b=2
c=myfunc(b)
? c
do myproc with 5
** in VFP5.0 u can also call them liek that
** (or so I've heard...)
myproc(5)
myfunc(5)

** note the myfunc is definesd as a procedure and myproc is
** defined as a function

procedure myfunc
lparam a
return a+1

function myproc
lparam a
? a+1
return

>>functions and procedures in fox <s>

>In C, for example, the difference between them is only in the mind of the programmer, not in the sintax of the language
though in C there is no entity specifically known
as a procedure the difference is by the definition
of procedures vs. function

void proc1 {....} is a procedure
anything that returns a value (e.g. int func1 {...})
is a function
while in fox as the previous example shows u can define
a procedure to act just as a function
also
if u'll look at the help in the manuals on procedures and functions - u will not find significant differances

Arnon Gal-Oz
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform