Difference between revisions of "FLDCOUNT()"

From Lianjapedia
Jump to: navigation, search
 
Line 22: Line 22:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Cursor Functions]]

Latest revision as of 04:51, 7 December 2012

Purpose

Function to count fields contained in a table

Syntax

FLDCOUNT([<workarea | alias>])

See Also

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

Description

The FLDCOUNT() 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 FLDCOUNT() function.

Example

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