Program module structure

Program modules consist of the following areas:

  • variable definition area;
  • procedure and function area;
  • main program area.

A program module may not contain any of the areas.

Variable definition area occupies space from the beginning of module up to the first Procedure or Function operator or any executable operator. This area may contain only variable definition operators Variable.

Procedure and function area occupies space from the first Procedure or Function operator to any executable operator outside this area.
Main program area  occupies space from the first executable operator outside procedure and function area to the end of the module. This area may contain only executable operators. Main program area is executed during module initialization. Usually main program area contains operators that initialize variable with values that should be used to make actions up to the first call of any procedure or function in a module.

1C:Enterprise Developer's Community