Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Spaces in Paths
Message
De
01/05/2012 04:02:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/04/2012 17:49:21
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01542915
Message ID:
01542963
Vues:
51
>>This tells me that I don't need the quotes in
>>commands that can take a name expression.
>>
>>In addition, I was hoping someone would know off-hand
>>if it is also the case in all commands that
>>have a file name or a file skeleton as a
>>parameter.
>
>Commands and functions don't take "file names" or "file skeletons" as parameters, they take strings. The rules for file name/skeleton parameters are no different from the rules for strings.

...but there are stricter rules for strings which are filenames - they can't contain just any bytes, they can't be null, there's a length limit imposed by the filesystem, etc etc.

My rule of thumb is that any string that holds a regular filename is a good filename string :). This means that it can't contain a quotation mark, asterisk, question mark, colon (except in position 2 if position 1 holds a disk letter), pairs of backslashes (except before a servername in a UNC address), multiple leading or trailing spaces... did I forget anything?

The quotation marks around a filename string are not part of that string, they are delimiters required for the command where that string is used, and I never make them a part of that string. If I have a filename in a variable or an expression, I use name expressions, period. Macros? Not for filenames.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform