finding out how many fields

Jay R. Ashworth jra at baylink.com
Thu Jul 29 14:10:16 PDT 2004


On Thu, Jul 29, 2004 at 03:28:18PM -0400, William Randall wrote:
> > I can do the lookup to any old table.  Is there a generic way to actually
> > determine how many fields are extant in the target table so that I never
> > try to access past that point in the array when handling fields from the
> > target table of the lookup?  I'm trying to avoid a situation where I try
> > accessing a field that's "out of bounds" (ie, doesn't exist).
> 
> Do you mean
> 
> Syntax:
>        Then: xx = NUMFIELD(lookupname)
>        Then: xx = NUMFIELD(-)
> 
> lookupname is the name of a lookup.
> - represents the current file (file in which the processing resides).
> The return value is the number of fields in the designated file.  This value
> is assigned to the variable XX.
> 
> Version Ref: 4.5
> 
> Description:
> 
> NUMFIELD obtains the number of fields in a lookup file.

See?  I'm not the only one who doesn't read the manual.  ;-)

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the Filepro-list mailing list