Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [MOFScript]How to write this loop in MOFScript
[MOFScript]How to write this loop in MOFScript [message #620459] Thu, 28 August 2008 11:42
yeliu is currently offline yeliuFriend
Messages: 145
Registered: July 2009
Senior Member
Anyone knows how to write this code into loop:
'Connect ''.outport['1']->'o.outgoing.first().name ' -> '
o.outgoing.first().outputs.first().name '->
'o.outgoing.first().outputs.first().outgoing.first().name ' ->
'o.outgoing.first().outputs.first().outgoings.first().output s.first().name'.inport['1']'

'Connect ''.outport['2']->'o.outgoing.last().name ' -> '
o.outgoing.last().outputs.first().name ' ->
'o.outgoing.last().outputs.last().outgoing.first().name ' -> '
o.outgoing.last().outputs.last().outgoing.first() rst().name
In the above code, to simplify,o has 2 outports and 2 outgoings,and I use
outgoing.first() and outgoing.last() to print the two elements in outgoing
list.But acturally,o may have more than 1 outports.o's outgoing is a list
which contains more than 1 elements.

Can anyone help me?
Thank you for your help in advance!

Previous Topic:[MOFScript]print two list at the same time
Next Topic:[Epsilon] pre/post condition in EWL
Goto Forum:

Current Time: Thu Nov 26 00:51:01 GMT 2015

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

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