ChildDocs

(Engine-Level Function)

Description: Gets the module values for the root and all descendent modules that match the conditions defined by the second parameter. May also be called as "Child_Docs".
Returns: Pointer to a one dimensional array
Usage: Script Only.
Function Groups: Compilation and On-Line Modifications,  Advanced Module
Related to: ModuleFileName | RUNFileName
Format: ChildDocs(Module [, Filter])
Parameters:  
Module
Required. The module to search.
Filter

Optional. Any numeric expression that defines which modules are to be included in the returned set. Filter is formed by adding together the values from the following table. Defaults to 2 if missing or invalid.

(See: Bitwise Parameters & Operations)

Filter

Bit No.

Description

1

0

Include all modules, even if they are in the same file as their parent. False to only include modules with external files (subject to bits 2 and 5).

2

1

Recurse into submodules. False to include only immediate children.

4

2

Include only modules whose .RUN files are out of sync with their .SRC files.

8

3

Include the root module in the list, subject to bits 2 and 5.

16

4

Don't recurse if the module is added to the list.

32

5

Include only modules whose .SRC file exists (i.e. not just a .RUN file).

Comments: This function is used by the compiler subsystem. It returns a pointer to a single dimensioned array.

Example:

  If 1 Main;
  [
     AllList = ChildDocs(Scope(Self(), "Graphics"), 1 + 2 + 8);
  ]

The variable AllList will be set to an array containing all module values that are ancestors of module Graphics, including Graphics itself.