Inno Setup Preprocessor: Macros' Local array

Inno Setup Preprocessor

Inno Setup Preprocessor: Macros' Local array

In context of macro expression additional array named Local is valid. Its elements can be used for temporary storage and reusing values in sequential expressions. This array belongs to one context of macro call, that means that values stored in Local array are neither preserved from call to call (including recursive), nor are they accessible from anywhere except the macro expression.

#define DeleteToFirstPeriod(str *S) /* macro declaration */ \
  Local[1] = Copy(S, 1, (Local[0] = Pos(".", S)) - 1), \
  S = Copy(S, Local[0] + 1), \
  Local[1]