Skip to content

Commit 6363acd

Browse files
List changes (#3780)
* Start * Description * Description * Update 3610.md * MajorMinor * Apply suggestions from code review Co-authored-by: Henrik Tidefelt <[email protected]>
1 parent 5196f05 commit 6363acd

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

RationaleMCP/Changes/3_7/3610.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Discrete-time variability based on `GenerateEvents` #3610
2+
3+
## Main change
4+
5+
Variability of functions with `GenerateEvents`.
6+
7+
## Reason
8+
9+
Making it possible to create functions that generate events similarly as the built-in functions, and have rules consistent with them just being inlined.
10+
11+
## Breaks
12+
13+
``` modelica
14+
function bar
15+
input Real x;
16+
output Integer i = integer(x);
17+
annotation(GenerateEvents=false); // Redundant, but added for clarity
18+
end bar;
19+
20+
function foo
21+
input Real x;
22+
output Integer i = bar(x);
23+
annotation(GenerateEvents=true);
24+
end foo;
25+
26+
Real x=foo(time);
27+
```
28+
29+
The call of `bar` in `foo` is now illegal, similarly as in a model.
30+
Note that in practice `foo` might contain both something generating event and the call to `bar`.

RationaleMCP/Changes/Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This directory contains descriptions of semantic changes, particularly backwards incompatible changes, introduced in the various versions.
2+
3+
Clarifications, new or modified examples, reformulations, and changes in layout or other external resources will not be included in this list.
4+
5+
There are separate files for each release to make it easy to maintain during development, but the files may later be merged.

0 commit comments

Comments
 (0)