Difference between revisions of "FLDCOUNT()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to count fields contained in a table
 
Function to count fields contained in a table
 
  
 
==Syntax==
 
==Syntax==
 
FLDCOUNT([<workarea | alias>])
 
FLDCOUNT([<workarea | alias>])
 
  
 
==See Also==
 
==See Also==
[[AFIELDS()]], [[DBF()]], [[DISPLAY STRUCTURE]], [[FIELD()]], [[FILTER()]], [[FMT()]], [[LABEL()]], [[NFCOUNT()]], [[NDX()]], [[SET FIELDS]]
+
[[AFIELDS()]], [[DBF()]], [[DISPLAY STRUCTURE]], [[FIELD()]], [[FILTER()]], [[LABEL()]], [[NFCOUNT()]], [[NDX()]], [[SET FIELDS]]
 
+
  
 
==Description==
 
==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.
 
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==
 
==Example==
Line 24: Line 20:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 08:37, 10 February 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