Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any known issues with PARAMETERS()?
Message
De
29/06/2000 18:47:02
 
 
À
29/06/2000 17:48:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00386643
Message ID:
00386841
Vues:
16
If you use the parentheses syntax, do the parameters come across as PARAMETERS or LPARAMETERS?

>It'll work either way....from the Help file.....
>
>"Parameters can be passed to a procedure by including a PARAMETERS or LPARAMETERS statement in the procedure, or by placing a list of parameters immediately after PROCEDURE ProcedureName. Enclose the list of parameters in a set of parentheses, and separate the parameters with commas."
>
>
>>At the risk of being branded completely useless, shouldn't it be:
>>
>>define class upload as custom olepublic
>>     procedure openfile
>>     LPARAMETER cPathName
>>     if parameters() < 1 then
>>           return .f.
>>      else
>>           return "FOO"
>>      endif
>>enddef
>>
>>>At the risk of boring the crap out of you, here is the complete code:
>>>
>>>DEFINE CLASS upload AS Custom OLEPUBLIC
>>>	PROCEDURE OpenFile(cPathName)
>>>		IF PARAMETERS() < 1
>>>		   This.LastErrorC="No file specified"
>>>		   RETURN .F.
>>>		ENDIF
>>>
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform