Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's up with the PADL?
Message
From
11/10/2005 03:44:01
 
 
To
11/10/2005 01:32:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01057840
Message ID:
01057871
Views:
10
Hi Michael,

Since I used Clipper in the past and having to run some inherited code, I made this simple function to handle this in Fox.
function strzero
    lparameters nExp,nStrLen
    return right('00000000000000000000000000000000000000' + allt(str(nExp)), nStrLen)
Never had any problems with it.

Rgds++
Sergio


>>Hmm, interesting. I didn't know you could use PADL() with a general expression, I thought it had to be a string.
>
>tnNumero comes from an object property This.nNumero which is initialize from a cursor field which comes from a table on an integer field. So, if I select a field in a cursor that is an integer, store that in a property, I should end up with the proper value.
>
>IAC, as I said, I have this at various other levels as well. I have experienced this with VFP 9. Basically, I read a HTML form value with WWC object, such as Request.Form, and sometimes, I end up as well with that behavior when getting the VAL() value of what Request.Form returns. It simply just doesn't make any sense. I have started to put INT() mostly everywhere I am using PADL() now.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform