Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] How to model assignments in operations
[Xcore] How to model assignments in operations [message #1263632] Tue, 04 March 2014 16:53 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hello,

I'm playing around with XCore and wondering how I could realize an operation like this in XCore:
(btw this is java)
	public void drive(int distance) {
		if (statusCheckOK()) {
			while (distance > 0) {
				distance--;
			}

		}
	}

I am trying to model this using Xcore but can't find any solution. Is it even possible to use arithmetic expressions in Xcore?

~Alex

[Updated on: Tue, 04 March 2014 16:57]

Report message to a moderator

Re: [Xcore] How to implement assignments in operations [message #1263773 is a reply to message #1263632] Tue, 04 March 2014 19:22 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 04/03/2014 17:53, Alexander R wrote:
> Hello,
>
> I'm playing around with XCore and wondering how I could realize an
> operation like this in XCore:
> (btw this is java)
>
> public void drive(int distance) {
> if (statusCheckOK()) {
> while (distance > 0) {
> distance--;
> }
>
> }
> }
>
> I am trying to model this using Xcore but can't find any solution. Is it
> even possible to use arithmetic expressions in Xcore?
>
> ~Alex
Maybe if https://wiki.eclipse.org/Xcore#Specifying_an_Operation helps?
Previous Topic:to deletion
Next Topic:Ignoring elements from XML
Goto Forum:
  


Current Time: Wed Apr 24 16:02:03 GMT 2024

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

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

Back to the top