(Created page with " ==== EAL differences ==== When using EAL one often want to stack expressions after each other. To allow for this EAL has introduced an expression separator: The semicolon “...") |
No edit summary |
||
Line 1: | Line 1: | ||
In MDriven we do however want to change data when appropriate – so we use the exact same syntax as OCL in something we call EAL – ExtendedActionLanguage. | |||
We use EAL in MDriven here: | |||
* Action execute expression | |||
* Actions in ViewModel columns Execute expression | |||
* Class method implementations | |||
* StateMachine Effects | |||
==== EAL differences ==== | ==== EAL differences ==== |
Revision as of 19:10, 21 August 2017
In MDriven we do however want to change data when appropriate – so we use the exact same syntax as OCL in something we call EAL – ExtendedActionLanguage.
We use EAL in MDriven here:
- Action execute expression
- Actions in ViewModel columns Execute expression
- Class method implementations
- StateMachine Effects
EAL differences
When using EAL one often want to stack expressions after each other. To allow for this EAL has introduced an expression separator: The semicolon “;”. This means that you can build method bodies that do several things like this:
self.SomeDateTime := DateTime.Now; self.SomeInt := 27; self.SomeString := self.SomeDateTime.ToString('yyyy-MM-dd')
In EAL we use := to assign but = to compare.
In EAL we can also create new objects Thing.Create
Worth noting is that the expression separator “;” can only be used between statements. So writing this ‘a string’;0 is of type integer. But writing this ‘a string’;0; is of unknown type and hence wrong – the last statement that the parser expect after the last ; is not found