Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Enumeration - MOF file - OMC 1.9.2 (r7)

Enumeration - MOF file - OMC 1.9.2 (r7)

Hello,

  I don't know if the compilation and generation of C code for this following test are correct
           model TestEnumeration1
                  type Size = enumeration(small, medium, large, xlarge);
                   parameter Size t_shirt_size = Size.medium;
             end TestEnumeration1;

  because if I examine the MOF associated generated file, according to me, there is one mistake :
           class TestEnumeration1
                parameter enumeration(small, medium, large, xlarge) t_shirt_size = TestEnumeration1.Size.medium;
          end TestEnumeration1;

the defdinition of the type Size is not included

Thanks

Regards

ALAIN_2

Re: Enumeration - MOF file - OMC 1.9.2 (r7)

That is by design, the mof-file is only a partial representation of the intermediate model that is actually used by the compiler. It doesn't include types, only variables and functions.

There are 0 guests and 0 other users also viewing this topic
You are here: