11-05-2018, 04:53 PM
Hi Gintaras, e.
I am defining some user-defined types and I realize that I want to constrain the final string options for the type e.g.
In this example, it would be inappropriate to put B1 into CustomType.a but rather only str variables values "A1", "A2", "A3". However, the type structure would allow for this 'error'.
I would rather like to say that member a of type MyCustomType should only allow values A1, A2, A3 and member b should only allow values B1, B2, and B3.
Is that supported in QM?
Thanks!,
S
I am defining some user-defined types and I realize that I want to constrain the final string options for the type e.g.
type MyCustomType ~a ~b
MyCustomType CustomType
CustomType.a = "A1"
CustomType.a = "A2"
CustomType.a = "A3"
CustomType.b = "B1"
CustomType.b = "B2"
CustomType.b = "B3"
In this example, it would be inappropriate to put B1 into CustomType.a but rather only str variables values "A1", "A2", "A3". However, the type structure would allow for this 'error'.
I would rather like to say that member a of type MyCustomType should only allow values A1, A2, A3 and member b should only allow values B1, B2, and B3.
Is that supported in QM?
Thanks!,
S