Re: [Jolie-devel] OneWay messages
A service-oriented programming language.
Brought to you by:
fmontesi
From: Fabrizio M. <fam...@gm...> - 2013-11-21 10:22:42
|
Hi Matthias, this: > twice( number ) { > result = number * 2; > println@Console( result )(); > } is not a construct in the language. Request-Response operations support the { block } construct because it is useful to specify something to happen *in-between* the request and the response. For one-ways this is not necessary because they just receive something. Hence you can just use the semicolon operator for expressing a sequence and obtain what you want: twice( number ); result = number * 2; println@Console( result )() Cheers, Fabrizio. On Thu, Nov 21, 2013 at 11:04 AM, Matthias Dieter Wallnöfer <mwa...@ya...> wrote: > Hi developers, > > I got another question: in > http://www.jolie-lang.org/?top_menu=documentation&sideMenuAction=getting_started/behavior_and_deployment > we have a simple client-server example: >> |main| >> |{| >> |||twice( number )( response ) {| >> |||response = number * ||2| >> |||}| >> |}| > > But when I change it to be one-way I run into trouble: >> interface TwiceInterface { >> OneWay: twice( int ) >> } > and >> main >> { >> twice( number ) { >> result = number * 2; >> println@Console( result )(); >> } >> } > does not work. Why? > > Do I need something like this? >> main >> { >> [ twice( number ) ] { >> result = number * 2; >> println@Console( result )(); >> } >> } > > Cheers, > Matthias > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Jolie-devel mailing list > Jol...@li... > https://lists.sourceforge.net/lists/listinfo/jolie-devel |