Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's up with the PADL?
Message
De
11/10/2005 01:58:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/10/2005 00:54:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01057840
Message ID:
01057852
Vues:
12
>A method received a primary key like this:
>
>
>PARAMETER tnNumero
>
>
>That is an integer coming in from the table.
>
>The next line is using a PADL syntax:
>
>
>ERASE (gcClientFat+'Images\SchoolPicture\'+PADL(tnNumero,6,'0')+'.jpg')
>
>
>Instead of being something like ..\000005.jpg, it gives something like ..\005.00.jpg. This is not the first time this is happening. I have seen that since VFP 9 at several occasions where I am using PADL(). The only way to be sure this will be properly interpreted, I have to do this:
>
>
>ERASE (gcClientFat+'Images\SchoolPicture\'+PADL(INT(tnNumero),6,'0')+'.jpg')
>
>
>How can I resolve the issue?

Michel,
Numerics coming from results of say val() have decimal portion. Use int() as you did or alternatively you can use "set decimals to 0".
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform