FCOUNT()

From Lianjapedia
Revision as of 08:28, 10 February 2012 by Yvonne.milne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Function to count fields contained in a table

Syntax

FCOUNT([<workarea | alias>])

See Also

AFIELDS(), DBF(), DISPLAY STRUCTURE, FIELD(), FILTER(), LABEL(), NFCOUNT(), NDX(), SET FIELDS

Description

The FCOUNT() function returns the number of fields in the active table. If the optional <workarea | alias> is specified, then the function will operate in the required location. The command SET FIELDS will affect the value returned by the FCOUNT() function.

Example

use accounts
do while i <= fcount()
    ? field(i)
    ++ i
enddo