Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Okay I'm feeling dumb
Message
De
31/07/2000 16:30:53
 
 
À
31/07/2000 16:24:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00398985
Message ID:
00398993
Vues:
13
>I have a VFP executable that I'm passing a parameter to.
>
>From the run command on the Windows Start menu I type in:
>
>c:\test\send\ftpsend.exe '1'
>
>OR
>
>c:\test\send\ftpsend.exe '0'
>
>The main program has the parameter statement the string is passed in.
>Parameter ctranval
>
>IF VARTYPE(ctranval) # [C]
> STORE [0] TO ctranval
>ENDIF
>
>I then have a case statement
>
>DO CASE
> CASE ALLTRIM(ctranval) = '-1'
> DO FORM FORMS\loadftp
>
> CASE ALLTRIM(ctranval) = '0'
> DO FORM forms\getftp
>
> CASE ALLTRIM(ctranval) = '1'
> DO FORM forms\editftp
>
> OTHERWISE
> MEssageBox( [ctranval fell through with ]+ctranval+[. ],0,[Error])
>ENDCASE
>
>
>** Every time the code falls to the otherwise, and the ctranval is -1], or [0], or [1] when the messagebox is displayed.
>
>If I run the executable from the VFP command window [ DO ftpsend with '0' ] it works great.
>

All parameters passed to VFP executable are of type "C". Your VARTYPE may be thinking it's a numeric and making your parameter be a "0".
>Ideas?
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform