Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get rid of '0' in character string...
Message
 
 
À
11/07/2000 11:03:53
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00390434
Message ID:
00390779
Vues:
9
>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.
BTW, did SP4 fix this bug?

>
>>>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 ALLTRIM(STR()), and never really looked at anything else, so I didn't know if there was a benefit to using TRANSFORM() other than less typing.
>>
>>One function instead of two, and also look to the difference between:
>>lnNumber=2.345678901
>>?transform(lnNumber)
>>?alltrim(str(lnNumber))
>>
>>>>>There may be a better way, but of the top of my head:
>>>>>
>>>>>ALLTRIM(STR(VAL( LEFT( oJC.IssMonth, 2 ) )))
>>>>
>>>>Hi Jonathan,
>>>>
>>>>With VFP6.0 I make a habit to use transform() instead of alltrim(str())
>>>>
>>>>
>>>>>>Hi everybody,
>>>>>>
>>>>>>I have this string in my report:
>>>>>>SUBSTR(oJC.IssMonth,3) +' YEAR-TO-DATE RECAP THRU ISSUE ' +LEFT(oJC.IssMonth,2)
>>>>>>
>>>>>>left(oJC.IssMonth,2) would be '07', '08', etc. I would like to print just '7' or '8' in my Report. What would be the simplest way to achive this?
>>>>>>
>>>>>>Thanks.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform