Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code expansion error
Message
De
01/10/2012 13:37:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01554057
Message ID:
01554058
Vues:
98
This message has been marked as the solution to the initial question of the thread.
>Hi Gang!
>
>I have a question in my code below...
>
>I am wanting the loop at the bottom to shut down the SocketWrech's that are connected.... but when I run it, I get a Syntax error... command contains unrecognized phrase/keyword. Any idea what I did wrong? Thanks!
>
>lnLastSocket is global and is equal to 18
>
>
>LOCAL i
>i = 0
>
>IF VARTYPE(Thisform.p_ivr.SocketWrench0) <> 'U'	&& We have an object
>	IF Thisform.p_ivr.SocketWrench0.Listening
>		Thisform.p_ivr.SocketWrench0.Disconnect
>	ENDIF 
>	
>	FOR i = 1 TO lnLastSocket
>		IF Thisform.p_ivr.SocketWrench&i..Connected
>			Thisform.p_ivr.SocketWrench&i..Disconnect
>		ENDIF 
>	ENDFOR 
>ENDIF
>
>
>The error occurs on the "IF Thisform.p_ivr.SocketWrench&i..Connected" line.
>
>Thanks!

You can't use macro expansion on numerics
FOR i = 1 TO lnLastSocket
     lcWrench = TRANS(I)
     IF Thisform.p_ivr.SocketWrench&lcWrench..Connected
          Thisform.p_ivr.SocketWrench&lcWrench..Disconnect
     ENDIF 
ENDFOR
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform