Skip to content

declare a const array

Modest currently does not allow an array with a const / readonly modifier:
> error: Constants cannot be of composite type.

Background:
I have a model with very large int-arrays containing only constants needed for computation. Because I cannot declare them as const:

  • mcsta writes them in every state of the scheduler gererated with the new --scheduler flag,
  • modes writes them in my traces,
  • mosta shows them in the global variables section (practically rendering the output useless because dot cannot handle this).