Subject |
strip_chars function in a loop |
From |
Charlie <tm@tc.com> |
Date |
Wed, 01 May 2024 10:49:04 -0400 |
Newsgroups |
dbase.getting-started |
Hey Mervyn.. I am trying to use your function in a loop on a field called mintage which has large numbers with commas. It is a character field with numbers. I am trying to eliminate the commas after successfully appending into a new table. Everything works fine as far as appending the field, but when I try to loop it this way it just replaces with the same chatacter all the way through. Here is some code of things I've tried. The function is the same except I changed the cToStrip = ",". possibly that is the problem. Any ideas on this? Here is my code:
use csvconv.dbf
append from collection.dbf for csvt = true
go top
//do while not eof()
//msgbox( ""+ '"'+trim(mintage)+'"' )
//cStr = '"'+trim(mintage)+'"'
cStr = mintage
cNewStr = strip_chars(cStr)
replace mintage with cNewStr
// skip
//enddo
use
As you can see I have tried different combinations. Thanks for any help!
|
|