Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing one long string with multiple spaces to an .exe
Message
De
11/05/1999 16:08:35
 
 
À
11/05/1999 11:58:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00217269
Message ID:
00217416
Vues:
13
>I am trying to run a small interface program between a clipper program and a VFP5.0 program. The idea is to have the Clipper program call an 'exe' that I have created in VFP and import the data from one long string into a VFP free table. The problem is that VFP is evaluating spaces as delimiters and is truncating my string such that I can't evaluate each piece of the string.
>
>i.e "12345ABC 123 TEST" passes as "12345ABC 123 TEST"
>
>This is a problem because I am substringing the passed value and expecting it to be a certain length for each piece.
>
>Any ideas would be greatly appreciated.

A couple off the cuff

Have the Clipper app slap a set of double quotes around the string that is passed on the command line - it's taken in as a single parameter that way, where you can parse it without the concerns of what the command line interpreter is doing. IOW, Clipper fires the command line:

MyVFPApp.EXE "12345ABC 123 TEST"

Rather than passing the string, you could also put the string in a file and pass the name of the file containing the string to process. IOW, write the string into a textfile in Cripple..erm, Clipper, and then pass the name of the file to process.

There are literally dozens of additional ways to skin this cat...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform