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

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

A generic axis is a type of variable designed to serve as a reference (container) - either temporal or permanent - to another axis (real or generic).

Generic axes can be defined in all scopes, i.e., either in configuration file and from terminal (global axes), or within tasks, before (static axes) and within the Program …End Program block (local axes).

Generic axes can also be defined as “by-reference” parameters of subroutines and functions, as well as returned-values of functions. A generic axis may be a scalar or an array. An array may have up to 10 dimensions. Generic axis has no meaning until assigned with “real” axis (see below example).

Syntax

Common Shared|Dim Shared|Dim <axis_name>As Generic Axis {[ ]…}

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

-->?axislist

A1,A2,A3,A4

-->Common Shared GenAxis1  As Generic Axis

-->Common Shared GenAxesArray [5][5] Generic Axis

-->GenAxis1 = A2 ‘ assign real axis to generic axis

-->GenAxesArray [2][3] = A4 ‘ assign real axis to generic axis

move GenAxis1 100

See Also