M entryrefs provide a generalized target for referring to a line within a routine. An entryref may contain some combination of a label, an offset, and a routine name (in that order). The offset is delimited by a plus sign (+) and the routinename is delimited by a caret symbol(^). When an entryref does not contain a label, M assumes the offset is from the beginning of the routine. When an entryref does not contain an offset, M uses an offset of zero (0). When an entryref does not contain a routine name, M assumes the routine that is currently executing.
M permits every element in an entryref to have the form of an indirection operator, followed by an element that evaluates to a legitimate occurrence of that portion of the entryref.
While most commands and functions that use entryrefs permit argument indirection, M does not accept indirection that resolves to a combination of label and offset or offset and routine name. |
Offsets provide an extremely useful tool for debugging. However, avoid their use in production code because they generally produce maintenance problems.