scitools.com

← Metric catalog

Objects Set is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.

Objects Set

API IDCountObjectsSet
TargetsFunctions
LanguagesAny
CategoriesCoupling
CostQuery

The number of times this function sets objects

Example:

    int my_global = 10;
    void sets(int x)
    {
      int y, z;
      x = 1;           // + 1 Parameters count
      x = 2;           // + 1 Duplicates count
      y = 1;           // + 1 Locals count
      y = 2;           // + 1 Duplicates count
      my_global = 1;   // + 1 Globals count
      my_global = 2;   // + 1 Duplicates count
    }                  // CountObjectsSet = 6
    

Compare to CountObjectsSetUnique which counts unique objects this function sets.