You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
agent A1 {
var x : int
on Initialize {
this.x = doSometing1
}
on Initialize {
doSometing2
}
}
agent A2 extends A1 {
on Initialize {
if (this.x == 45) {
doSomething3
} else {
doSomething4
}
}
}
The code is written by assuming that the event handlers of the super type are run before the event handlers of the sub type. It is similar to the OOP construction.
Should SARL use this semantic?
If not, how can we code initializers that are waiting for super-type's initialization?
All the event handlers must be run in parallel, even inside super types.
In the previous example, the three handlers must be run.
The text was updated successfully, but these errors were encountered: