| **Navigation:**  [[introduction.htm|Language Reference]] > 2 - Program Source Code Format > Program Format >====== MEMBER (identify member source file) ====== | [[program declare a program .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[map declare procedure prototypes .htm|{{btn_next_n.gif|Next page}}]] | | || | | **MEMBER(**// //[ //program //] **)** | | | [**MAP** | | | //Prototypes// | | | **END** ] | | [label] | //local data// | | | //procedures// | {{newcnet.jpg|NewCNet.jpg}} In Clarion#, you can add a default access modifier to the PROGRAM statement: **MEMBER[, PUBLIC|,INTERNAL]** All declarations without an explicit access modifier will have the default access modifier. The default for MEMBER is INTERNAL. {{blk2blue.jpg|blk2blue.jpg}} | **MEMBER** | The first statement in a source module that is not a PROGRAM source file. Required. | | //program// | A string constant containing the filename (without extension) of a PROGRAM source file. If omitted, the module is a "universal member module" that you can compile in any program by adding it to the project. | | **MAP** | Local procedure declarations. Any procedures declared here may be referenced by the procedures in the MEMBER module. | | //prototypes// | PROCEDURE declarations. | | //local data// | Declare Local Static data which may be referenced only by the procedures whose source code is in the MEMBER module. | | //procedures// | Source code for the procedures in the MEMBER module. | **MEMBER** is the first statement in a source module that is not a PROGRAM source file. It may only be preceded by source code comments. It is required at the beginning of any source file that contains PROCEDUREs that are used by a PROGRAM. The MEMBER statement identifies the //program// to which the source MODULE belongs. A MEMBER module may have a local MAP structure (which may contain MODULE structures). The procedures //prototyped// in this MAP are available for use by the other procedures in the MEMBER module. The source code for the procedures declared in this MEMBER MAP may either be contained in the MEMBER source file, or another file (if //prototyped// in a MODULE structure within the MAP). If the //program// parameter is omitted from the MEMBER statement, you must have a MAP structure that //prototypes// the procedures it contains. You also need to INCLUDE any standard EQUATEs files that are used in your source code. If the source code for a PROCEDURE //prototyped// in a MEMBER module's MAP is in a separate file, the //prototype// must be in a MODULE structure within the MAP. The source file MEMBER module containing the PROCEDURE definition must also contain its own MAP which declares the same //prototype// (that is, the //prototype// must appear in at least two MAP structures--the source module containing it and the source module using it). Any PROCEDURE not declared in the Global (PROGRAM) MAP must be declared in a local MAP(s) in the MEMBER MODULE which contains its source code. Data declared in the MEMBER module, after the keyword MEMBER and before the first PROCEDURE statement, is Member Local data that may only be accessed by PROCEDUREs within the module (unless passed as a parameter). Its memory allocation is Static. **Example:** **!Source1 module contains:** ** ****MEMBER****('OrderSys')            !Module belongs to the OrderSys program** **  MAP                           !Declare local procedures** **Func1 PROCEDURE(STRING),STRING  !Func1 is known only in both module** **   MODULE('Source2.clw')** **HistOrd2 PROCEDURE              !HistOrd2 is known only in both modules** **   END** ** ****END** **LocalData STRING(10)            !Declare data local to MEMBER module** **HistOrd  PROCEDURE              !Declare order history procedure** **HistData  STRING(10)            !Declare data local to PROCEDURE** ** CODE** ** LocalData = Func1(HistData)** **Func1 PROCEDURE(RecField)       !Declare local procedure** ** CODE** **  !Executable code statements** **!Source2 module contains:** **   MEMBER('OrderSys')           !Module belongs to the OrderSys program** **  MAP                           !Declare local procedures** **HistOrd2 PROCEDURE              !HistOrd2 is known only in both modules ** **   MODULE('Source1.clw')** **Func1 PROCEDURE(STRING),STRING  !Func1 is known only in both module** **   END** **  END** **LocalData STRING(10)            !Declare data local to MEMBER module** **HistOrd2 PROCEDURE              !Declare second order history procedure** ** CODE** ** LocalData = Func1(LocalData)** **See Also:** [[map declare procedure prototypes .htm|MAP]] [[module specify member source file .htm|MODULE]] [[procedure define a procedure .htm|PROCEDURE]] [[class object declaration .htm|CLASS]] [[public set variable public to all class modules .htm|PUBLIC]] [[internal class member assembly accessible .htm|INTERNAL]] [[data declarations and memory allocation.htm|Data Declarations and Memory Allocation]]