Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: PADR padded a varbinary with spaces
Message
 
 
To
19/10/2005 06:27:33
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01060176
Message ID:
01060323
Views:
15
Fabio,

It's not a bug.

Quoting from help: If you omit cPadCharacter, spaces (ASCII character 32) are used for padding.

If you want padr() to pad with something besides spaces give it the third argument. This works as I'd expect it to.
? VARTYPE(PADR(0H,1,0h00)),ASC(PADR(0H,1,0h00))
>Expected:
>PADR(0h) return a VARBINARY value,
>then the default padding value, for a varbinary, must to be 0h00.
>
>
>? VARTYPE(PADR(0H,1)),ASC(PADR(0H,1)) && expected Q,0
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform