Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL question(How to access each element in the sequence in turn)
ATL question [message #1844805] Sun, 26 September 2021 10:59 Go to next message
Yanhong Dong is currently offline Yanhong DongFriend
Messages: 25
Registered: September 2021
Junior Member
using{
sV : SysML!ownedAttribute =
thisModule.AllStateVariable.first();
fV : SysML!ownedAttribute = thisModule.AllFlowVariable;
}
fv : MM!FlowVariable for(f in fV)(
variableName <- f.name
)
Writing this way will report an error, so I want to know how to loop through each element in the sequence
Re: ATL question [message #1844812 is a reply to message #1844805] Sun, 26 September 2021 19:53 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

It depends what section of a transformation rule you write this in: the declarative "to" part works differently than the imperative "do" part. The code snippet you provided is not a complete transformation rule. Can you provide a complete code example?

Cheers,
Dennis
Re: ATL question [message #1844875 is a reply to message #1844812] Tue, 28 September 2021 13:01 Go to previous message
Yanhong Dong is currently offline Yanhong DongFriend
Messages: 25
Registered: September 2021
Junior Member
Thank you for your explanation, my problem has been solved
Previous Topic:References to enumerations defined in a profile
Next Topic:ATL String handling issues
Goto Forum:
  


Current Time: Sat Nov 11 08:17:25 GMT 2023

Powered by FUDForum. Page generated in 0.23155 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top