AddModule

Description:              This function adds a new module to an existing module and returns the value of the newly created module.

Warning:               This function may cause irrecoverable alteration of your application. It should be used only by advanced programmers.

Returns:                    A new module value

Usage:                       Script

Format:                      AddModule(Parent, Name, Reserved, Attrib, Class, VarTextSize, DocFileName)

Parameters:             Parent   { module value }  { required }  { no default: }

                                                Parent is any expression that returns a module value.  Specifies the parent module of the new module.

                                    Name   { text }  { required }  { no default: }

                                                Name is any text expression providing a name for the new module.

                                    Reserved  { numeric }  { required }  { 0: }

                                                Reserved for future use (set to 0).

                                    Attrib  { numeric }  { required }  { no default: }

                                                Attrib is any numeric expression giving the module's attribute bits as follows:

Attrib

Bit No.

Attribute

0

No special attributes

1

0

Reserved – set to 0

2

1

Queued

4

2

Reserved – set to 0

8

3

Reserved – set to 0

16

4

Reserved – set to 0

32

5

Reserved – set to 0

64

6

Reserved – set to 0

128

7

Reserved – set to 0

256

8

Reserved – set to 0

512

9

Protected

                                    Class    { numeric }  { required }  { no default: }

                                      is any numeric expression in the range 0 to 65535, which gives the class for the new module.

                                    VarTextSize   { numeric }  { required }  { no default: }

                                                VarTextSize any numeric expression giving the length of the variable declaration for the new module (i.e. NewMod MODULE { a new module }; ).

                                    DocFileName { text }  { required }  { no default: }

                                                DocFileName any text expression giving the file name of the new module's definition document.

Comments:               None.

 

See Also:

AddOptional | AddParameter | AddState | AddStatement | AddVariable | CreateModule | FirstState