Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use of COPY FILE and PUTFILE
Message
De
25/04/2000 09:01:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/04/2000 08:42:15
Diane Comeau
Secure Financial Services, Inc
Colchester, Vermont, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00363073
Message ID:
00363094
Vues:
22
>Oh, my stars, that worked. Geez, I had no idea. Thanks so much for your help!


Diane,
A little explanation why it worked :) & Macro expansion operator practically removes outer quotes.
pZipFile would return something like "my long file.zip"

copy file ... to &pZipFile

is interpreted as :

copy file ... to my long file.zip

As Nick said adding extra quotes would make it too.

copy file ... to "&pZipFile"

is interpreted as :

copy file ... to "my long file.zip"

Macro expansion removing quotes are sometimes usefull :
lcFieldList = "FirstName, LastName, Age"
lcFileName = "c:\Program Files\My Data Bank\Customers.dbf"
lnOrder = "2,1"

select  &lcFieldList from (lcFileName) order by &lnOrder
For lcFieldList and lnOrder you want expressions to be written as is w/o quotes (not name). lcFileName OTOH is a "name". You couldn't just say :

select &lcFieldList from lcFileName

for VFP would look for a table named "lcFileName.DBF".

() are used for "name expressions" and is recommended way. You should use parentheses instead of macro expansion whenever expected parameter is a "name" (it can be windowname, filename etc).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform