Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Couple questions about a procedure in a class definition
Message
 
 
À
23/08/2007 17:00:38
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01250023
Message ID:
01250027
Vues:
15
>Couple questions as to what this procedure is doing. It works, but I'm not sure about the "@strData" in the GETDATA. Is that a variable by reference? So that after GETDATE runs, the value of strData is returned? Also, why the "SPACE(256)" line? Is it to define it as a string, or to define the length, or both? It works with strings much larger than 256, so I'm just curious what the purpose is. Thanks!
>
>
>	PROCEDURE DMSWinsockControlEvents_DataArrival(bytesTotal AS NUMBER) AS VOID ;
>		HELPSTRING "Occurs when data has been received from the remote computer"
>
>		strData = SPACE(256)  && Define string to pass to GetData
>
>		THIS.oSock.GETDATA(@strData)
>
>		? strData
>
>	ENDPROC
>
Yes, this is a variable passed by reference so the procedure would see its updated value after the call. I think it would work even if you set it to ""

You may also want to check http://www.berezniker.com/display/VFP/Difference+between+FUNCTION+and+PROCEDURE+statements
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform