APROCINFO( ) Function

Visual Studio .NET 2003

Creates an array containing Visual FoxPro language elements contained in a program file

APROCINFO(ArrayName, cFileName [, nType])

Return Values

Returns the number of rows added to the array.


Specifies the name of the array to be created.
Specifies the filename of the program that this function traverses.
Specifies the type of information returned in cArrayName. The following table specifies valid nType values and describes the information returned by each nType value.
nType Description Array Details
0 (default Populates the array with all document information. Column1 – Doc View content

Column2 – line

Column3 – type

Column4 – indentation

Indentation is used with preprocessor directives to show nested levels of #IF type statements.
1 Populates the array with only the class definitions in the document. Column1 – class name

Column2 – line

Column3 – parentclass

Column4 - is OLEpublic

2 Populates the array with only class procedure information (class definition excluded) Column1 – Doc View content

Column2 – line

3 Populates the array with #define and other preprocessor directives in the document. Column1 – Doc View content

Column2 – line

Column3 – type

The following table describes the "type" values returned in Column3 for nType values of 0 and 3.

nType Description
Define #DEFINE preprocessor directive
Directive Other preprocessor directives, such as #IF
Class Class definition line
Procedure Procedure, Method or Event


Visual FoxPro automatically creates the array you specify if it doesn't already exist. Visual FoxPro automatically increases or truncates the size of the array to accommodate the returned information. This function supports program (PRG) files only.

See Also

Working with Arrays | Arrays | Array Manipulation | EDITSOURCE( ) Function | #DEFINE ... #UNDEF Preprocessor Directive | #IF ... #ENDIF Preprocessor Directive | Modifying a Class Definition | Document View Window