Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errors because of DEFINE...ENDDEFINE
Message
De
15/08/2007 16:59:21
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Errors because of DEFINE...ENDDEFINE
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01248370
Message ID:
01248370
Vues:
76
Is there some sort of rule of where to define a class in the MAIN program of a project? Seems that if I use DEFINE...ENDDEFINE, everything after that has errors because it thinks it should be in a function when I try to build the EXE. Thanks!

UPDATE: I found this, but I don't know why it would be problem:
Statement is not in a procedure (Error 1931)
Statements are not allowed after the ENDPROC clause. For more information, see DEFINE CLASS.
I put this in my MAIN prg just to test defining a class:


DEFINE CLASS EMPS_Out_Class AS SESSION OLEPUBLIC

FUNCTION Multiply(tnOne AS INTEGER, tnTwo AS INTEGER) AS INTEGER
LOCAL lnResult
ENDFUNC

ENDDEFINE


And all lines after it get reported as errors during the build. Why is having an ENDFUNC bad?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform