fieldlen question
Kenneth Brody
kenbrody at bestweb.net
Mon Jan 8 09:13:54 PST 2007
Quoting Don Coleman (Mon, 8 Jan 2007 10:22:01 -0500):
> Attempting to use fieldlen to determine the length of individual fields
> I need to string together and trim by priority. Clearly I have something
> incorrect because in the example below AB=0. Could someone point out my
> error so that AB=7 (COLEMAN being 7 characters).
[...]
> Then: end
> @ENTSEL
> Then: AA(10,*)="COLEMAN"
> Then: AB=fieldlen(-,AA)
> Then: SHOW "AB="{AB;display
> Then: end
You don't have a field named "COLEMAN" in the current file, so the
length is returned as zero. You probably meant:
AB = fieldlen(-,"AA")
or
AB = len(AA)
to get the length of field AA.
However, this will still return 10 and not 7, as AA is defined with
a length of 10. If you want to know then length after removing the
trailing spaces, you'll need to do something like:
zz = aa { ""
ab = len(zz)
(Assuming that ZZ is not declared with a length/type.)
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list