Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get rid of '0' in character string...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00390434
Message ID:
00390844
Vues:
8
>>I only use the ALLTRIM(STR()) format when I know I'm dealing with integers. If I have decimals, I pass the extra parameters to STR() that specify the number of decimals. I'm kind of leary of switching to TRANSFORM() after reading the Knowledge Base article I mentioned previously. Did you take a look at that?
>
>Yep, you're right. Thanks for the warning. I have set compatible off by default.
>I will be more careful since then.
>
>Thanks again.

>>>>Is there any particular reason why you use TRANSFORM() instead of ALLTRIM(STR())? I just searched the MS Knowledge Base and found the following article that mentions some problems with TRANSFORM(): Q247494. I've just always used

That KB article makes a rather rash suggestion. I think if you use SET COMPATIBLE ON you should immediately use your TRANSFORM and then SET COMPATIBLE OFF right away. To quote the Hacker's Guide:

"SET COMPATIBLE ON is an oxymoron.... Not only does it make the language less compatible with anything else out there, but it breaks code left and right in ways you can't even imagine. Originally, in the FoxBASE days, this was a way to have your cake and eat it, too: fast Fox code wrapped within an IF FOX….ENDIF routine, and compatibility if you needed to compile with other Xbase languages as well. But there are so many places where dBASE and FoxPro have parted company that this command should never make it into a production system."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform