MKID Operator
Date: 2020-10-07 18:10:00

Up | Next | Prev | PrevTail | Tail

### 7.12 MKID Operator

In many applications, it is useful to create a set of identiﬁers for naming objects in a consistent manner. In most cases, it is suﬃcient to create such names from two components. The operator MKID is provided for this purpose. Its syntax is:

MKID(U:id,V:id|non-negative integer):id

for example

mkid(a,3) -> A3
mkid(apple,s) -> APPLES

while mkid(a+b,2) gives an error.

The SET statement can be used to give a value to the identiﬁers created by MKID, for example

set(mkid(a,3),3);

will give A3 the value 2. Similarly, the UNSET statement can be used to remove the value from these identiﬁers, for example

unset(mkid(a,3));

Up | Next | Prev | PrevTail | Front