Opened 10 years ago

Last modified 10 years ago

#2826 new enhancement

Short version of match

Reported by: Per Östlund Owned by: Martin Sjölund
Priority: normal Milestone: Future
Component: MetaModelica Version: trunk
Keywords: Cc: Peter Fritzson

Description (last modified by Per Östlund)

It would be nice to have a more compact version of match, similar to what we have in Susan:

Boolean is_var := match e case DAE.VAR() then true else false;  // Short version
Boolean is_var := match e case DAE.VAR() then true; else false; end match; // Current version

I.e. just some syntactic sugar to make it more convenient to use match in assignments.

Change History (2)

comment:1 by Per Östlund, 10 years ago

Description: modified (diff)

comment:2 by Martin Sjölund, 10 years ago

Cc: Peter Fritzson added
Note: See TracTickets for help on using tickets.