Delete a field
Can someone please let me know how I would delete the first and last character
on a mem variable.
Thanks
Paul
# 1 Re: Delete a field
>Can someone please let me know how I would delete the first and last character
>on a mem variable.
get the length of the variable. If ten:
memvar= substr(memvar,2,9)
or
Replace field with substr(memvar,2,9)
There is other ways to do this.
# 2 Re: Delete a field
If you need to delete the first and last characters, your length would need
to be 8, not 9.
Fred
Micorosoft Visual FoxPro MVP
"Jarrett" <Jcrudisill@yahoo.com> wrote in message
news:3f6872be$1@tnews.web.dev-archive.com...
>
>
> >Can someone please let me know how I would delete the first and last
character
> >on a mem variable.
>
>
> get the length of the variable. If ten:
> memvar= substr(memvar,2,9)
> or
> Replace field with substr(memvar,2,9)
> There is other ways to do this.
# 3 Re: Delete a field
"Fred Taylor" <ftaylor@mvps.org> wrote:
>If you need to delete the first and last characters, your length would need
>to be 8, not 9.
Thanks Fred. Didn't test my code before I put it out there. I should know
not to do that by know.
# 4 Re: Delete a field
cString = "abcdefg"
? SUBSTR(cString, 2, LEN(cString) - 2)
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden@mvps.org, www.cindywinegarden.com
"Paul Summerfield" <fox@quantumistic.co.uk> wrote in message
news:3f686518$1@tnews.web.dev-archive.com...
>
> Can someone please let me know how I would delete the first and last
character
> on a mem variable.