Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00136915
Message ID:
00137433
Vues:
13
Joseph,

I tried ALLTRIM(); it didn't work


>ALLTRIM should work. TRIM should not work. A string that was created using STR() is now just a character string like any other character string. All string manipulation functions should work as advertised.
>
>>Joseph,
>>
>>I found what my trouble was, and it was a rookie mistake. Here it is:
>>
>>lnATAFValue = EVAL('xtab.'+lcFName)
>>lcATAFValue = STR(lnATAFValue) &&convert from numeric to character
>>SELECT ATA_Report
>>GO BOTTOM
>>REPLACE (lcATAFName) WITH LTRIM(lcATAFValue)
>>I tried trim() and alltrim() they didn't work. With the LTRIM() function it removed the blank spaces from the string. Apparently, only L(or R)TRIM(), is the only way to remove blank spaces from a character string that has been created with STR().
>>
>>Thanks for everyone's suggestions
>>
>>
>>>Perry, have you set a breakpoint and done the usual things like watching any variables that apply, browsing the table before the replace, browsing the table after the replace, etc? Frankly, there have been some suggestions that have been all but ignored and this is either a simple problem (wrong work area selected, not pointing at a record, variable is not what you expect) or a big problem (your installation of VFP doesn't work), so maybe you could try some of the suggestions and report your findings here.
>>>
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform