RobotStudio event

Newbie questions

Options

Why would you want to seperate routines into different Modules? Why not have all routines in one?

What is the difference between Program and System modules?

How important is the routine order in a module?

 

Comments

  • RussD
    Options
    1. Program modularity. It is much easier to maintain code that is grouped into logical containers rather than sorting through thousands of lines of code to find one routine or function.
     

    2. Program modules are part of a program that can be loaded and unloaded at runtime, system modules are part of the system and can only be deleted or added manually. There are also additional attributes that can be used to configure system modules to hide them, make them read-only, etc.

     

    3. Routines can be declared in any order. The only items that are order sensitive is record declarations and module level data declarations. These must be declared at the top of the module file before routine declarations, and record types have to be declared before data instances.
    RussD2009-02-10 19:24:10
    Russell Drown