Ansys Learning Forum › Forums › Discuss Simulation › Embedded Software › array inside structure › Reply To: array inside structure
Hello,
You have the possibility to use anonymous type (using the tetxual syntax of the Scade language). Here is an example of a structure that use as label both an array and a structure:
Even if this is feasible and correct, I strongly recommend you to use Named as much as possible. Indeed, having named types improves readability and maintanability of the model. It also allows to reuse the type definitions while this is not posisble with anonymous type.
In a Scade model, types definitions are often decomposed starting from basic types (i.e. temperature: float32) shareable between different projects to more complex types specific to the current project (T_struct: {currentTemp: temperature, targetTemp: temperature, idle: bool}).
Hope this helps,
Benjamin