|
|
|
Re: Question about imperative do blocks in ATL [message #1794309 is a reply to message #1794197] |
Tue, 28 August 2018 18:01 |
Gehan Mustafa Kamel Selim Messages: 7 Registered: August 2018 |
Junior Member |
|
|
Just to follow up on my previous question, I found a transformation with the following called rule:
rule MeasureSet2ValueRow(ms : Measure!MeasureSet) {
to
retval : Table!Row (
cells <- blabla,
cells <- blabla)
do {
retval; }
}
Then, in the same transformation, another called rule invoked the above called rule as follows:
rows <- allMeasSet->
collect(ms|thisModule.MeasureSet2ValueRow(ms))
Thus, in the latter rule invocation, the return value of the called rule was not assigned to a specific value (they were only accumulated using the collect operation, but without assigning the return value to variables).
My question is, since the return value of MeasureSet2ValueRow in the invocation wasn't assigned to a variable, would this rule invocation have still worked if the rule MeasureSet2ValueRow didnot have a do block? If not, why not ? If yes, then what''s the need for "retval;" in the do block of the rule MeasureSet2ValueRow ?
Thanks a lot !
|
|
|
Re: Question about imperative do blocks in ATL [message #1794310 is a reply to message #1794197] |
Tue, 28 August 2018 18:02 |
Gehan Mustafa Kamel Selim Messages: 7 Registered: August 2018 |
Junior Member |
|
|
Just to follow up on my previous question, I found a transformation with the following called rule:
rule MeasureSet2ValueRow(ms : Measure!MeasureSet) {
to
retval : Table!Row (
cells <- blabla,
cells <- blabla)
do {
retval; }
}
Then, in the same transformation, another called rule invoked the above called rule as follows:
rows <- allMeasSet->
collect(ms|thisModule.MeasureSet2ValueRow(ms))
Thus, in the latter rule invocation, the return value of the called rule was not assigned to a specific value (they were only accumulated using the collect operation, but without assigning the return value to variables).
My question is, since the return value of MeasureSet2ValueRow in the invocation wasn't assigned to a variable, would this rule invocation have still worked if the rule MeasureSet2ValueRow didnot have a do block? If not, why not ? If yes, then what''s the need for "retval;" in the do block of the rule MeasureSet2ValueRow ?
Thanks a lot !
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01428 seconds