Spinroot

A forum for Spin users

You are not logged in.

#1 2011-10-27 18:34:37

lejla
Member
Registered: 2011-10-27
Posts: 2

Help!

proctype hello(){ printf("Hello\n") }
proctype world(){ printf("World\n") }
init { atomic {run hello(); run world()}}

I need to modify this code so that the command printf("Hello") is executed always before printf("World"),and it needs to be done with two channel.

I am new in Spin,and this is my frist homework and I'm not sure is it possible to send printf over a channel :S
Thanks in advance !

Offline

#2 2011-10-28 02:44:06

spinroot
forum
Registered: 2010-11-18
Posts: 700
Website

Re: Help!

it is a good assignment. solving it will teach you useful things about building spin models!

Offline

#3 2011-10-28 08:46:31

lejla
Member
Registered: 2011-10-27
Posts: 2

Re: Help!

I wonder if you could give me a little hint for solving it, like how to send printf or string over a channel.
I will be very greatful!

Offline

Board footer

Powered by FluxBB