finding out how many fields

William Randall wrandall at fptech.com
Thu Jul 29 12:28:18 PDT 2004


----- Original Message ----- 
From: "Fairlight" <fairlite at fairlite.com>
To: "filePro Mailing List" <filepro-list at lists.celestial.com>
Sent: Thursday, July 29, 2004 3:15 PM
Subject: finding out how many fields


> Maybe a silly question, but I surely don't know the answer yet.  (And
don't
> call me Shirley.)
>
> Let's say I have an anonymous array overlaid on top of a generic lookup
> starting at field 1 of the lookup.
>
> 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).
>
> mark->

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.

Bill



More information about the Filepro-list mailing list