Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
101 VFP7 Things, Part 20 - DisplayPath()
Message
De
11/01/2001 16:06:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
101 VFP7 Things, Part 20 - DisplayPath()
Divers
Thread ID:
00462514
Message ID:
00462514
Vues:
50
If you've ever had a tough time displaying a short enough path to your users but show them the right parts of a long path name, VFP7's DisplayPath() might be able to help. It automatically strips out folder names to try and make a file name fit in the specified number of spaces.

?DISPLAYPATH(HOME() + 'vfp.exe', 5) && Error
?DISPLAYPATH(HOME() + 'vfp.exe', 10) && "vfp.exe"
?DISPLAYPATH(HOME() + 'vfp.exe', 20) && "c:\..\vfp7\vfp.exe"
?DISPLAYPATH(HOME() + 'vfp.exe', 40) && "c:\..\vfp7\vfp.exe"
?DISPLAYPATH(HOME() + 'vfp.exe', 50) && "c:\..\microsoft visual studio 7\vfp7\vfp.exe"
?DISPLAYPATH(HOME() + 'vfp.exe', 60) && "c:\program files\microsoft visual studio 7\vfp7\vfp.exe"


The first one gives you an error, I guess cause the file can't be reduced to that small of a string, but it kindof sucks. It would be nice if it returned a blank string, or .NULL. or something.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform