Primary Function | |
-- todo --
Returns true (.T.) if an index tag is a primary index tag; otherwise, returns false (.F.).
Namespace:
XSharp.VFP
Assembly:
XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax FUNCTION Primary(
nIndexNumber,
uArea
) AS LOGIC CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public static bool Primary(
Usual nIndexNumber = default,
Usual uArea = default
)
Request Example
View SourceParameters
- nIndexNumber (Optional)
- Type: Usual
Specifies the number of the index tag for which Primary( ) returns the primary status. Primary( ) returns the primary status in
the following order as nIndexNumber increases from 1 to the total number of structural compound and independent compound index tags.
Primary status for each tag in the structural compound index (if one is present) are returned first.
The primary status is returned for the tags in the order the tags are created in the structural index.
Primary status for each tag in any open, independent compound indexes are returned next.
The primary status is returned for the tags in the order in which the tags are created in the independent compound indexes.
If you omit nIndexNumber, Primary( ) checks the master controlling index tag to see if it's a primary index tag.
If there is no master controlling index tag, Primary( ) returns false (.F.).
- uArea (Optional)
- Type: Usual
Specifies the work area of the index tag specified with nIndexNumber.
Or
Specifies the work area of the index tag specified with nIndexNumber.
If you omit uArea, Primary( ) checks the index tag in the currently selected work area to see if it's a primary index tag.
Return Value
Type:
Logic
Logical
Examples 1Close Databases
2Set PATH TO (HOME(2) + 'Data\')
3Open Database testdata
4Use Customer
5For nCount = 1 TO TAGCOUNT( )
6IF !EMPTY(TAG(nCount))
7? TAG(nCount)
8? Primary(nCount)
9ELSE
10EXIT
11ENDIF
12ENDFor
See Also