Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local lnSomething as Integer
Message
De
15/06/2010 14:49:31
 
 
À
15/06/2010 14:12:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01469009
Message ID:
01469018
Vues:
58
It's purely for Intellisense. However, I have seen times when a VFP COM object could not be consumed if the type of a parameter was not specified. So, this would not work
DEFINE CLASS Example AS Session OLEPUBLIC
    FUNCTION DoSomething(tnParam1, tcParam2)
        * Do some processing
    ENDFUNC
ENDDEFINE
But this would
DEFINE CLASS Example AS Session OLEPUBLIC
    FUNCTION DoSomething(tnParam1 AS Integer, tcParam2 AS String)
        * Do some processing
    ENDFUNC
ENDDEFINE
>I have seen references in code that look like this:
Local lnSomething as Integer
>Obviously this tells me that {lnSomething} is an integer, but I knew that because it begins with ln,
>
>So, what is the purpose in doing so? Does VFP use this information in some way?
>
>P.S.: I do understand the use of this structure when it refers to 'as Form', or whatever, just not when it refers to a datatype like String or Integer.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform