Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Booctor
- message Number(value as int)
- message Fizz
- message Buzz
- actor Numbers(max as int) has ports(out):
- receive Run:
- for i in range(max):
- send Number(i)
- actor IsDiv() has ports(in, out):
- receive Number(value) as msg:
- if value % 3 == 0:
- send Fizz
- if value % 5 == 0:
- send Buzz
- else:
- send msg
- actor Display() has ports(in):
- receive Number(value):
- print value
- receive Fizz:
- print 'Fizz'
- receive Buzz:
- print 'Buzz'
- pipeline(Numbers(20) -> IsDiv3 -> Display).Run()
Add Comment
Please, Sign In to add comment