Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Okay I'm feeling dumb
Message
De
31/07/2000 16:34:29
 
 
À
31/07/2000 16:30:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00398985
Message ID:
00398998
Vues:
14
>>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?


I check the value of the ctranval variable in the messagebox. It is what ever I pass, '-1','0' or '1'. I have the vartype statement encase the parameter is not passed.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform