MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP

From SoftMC-Wiki
Jump to: navigation, search
Language: English  • 中文(简体)‎

A generic group is a type of variable, designed to serve as a reference (container) - either temporal or permanent - to another group (real or generic). Generic groups can be defined in all scopes, i.e., either in configuration file and from terminal (global groups), or within tasks, before (static groups) and within the Program …End Program block (local groups). Generic groups can also be defined as “by-reference” parameters of subroutines and functions, as well as returned-values of functions.  A generic group may be a scalar or an array. An array may have up to 10 dimensions. Generic grop has no meaning until assigned with “real” group (see below example).

Syntax

Common Shared <group>As Generic Group {[ ]…}

Availability

All versions

Scope

Configuration, Task or Terminal.

Since Version 4.5.17 the global (common shared ) declaration is also possible from the Library context.

Limitations

Write only.

Examples

Common Shared XYTable as group AxisName=X_axis AxisName=Y_axis

Common Shared Scara as group axnm = a1 axnm = a2 axnm = a3 axnm = a4

Common Shared GenGroup1  As Generic Group

Common Shared GenGroupArray [5][5] Generic Group

GenGroup1 = Scara

GenGroupArray [5][5] = XYTable

See Also