Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's up with the PADL?
Message
From
11/10/2005 01:58:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/10/2005 00:54:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01057840
Message ID:
01057852
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform