File: ex_1f.pml

package info (click to toggle)
spin 6.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 2,512 kB
  • sloc: ansic: 39,876; yacc: 1,021; makefile: 58; sh: 8
file content (13 lines) | stat: -rwxr-xr-x 261 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
// http://spinroot.com/spin/Doc/Exercises.html

#ifndef N
 #define N  2
#endif

init {
	chan dummy = [N] of { byte } // a message channel of N slots
	do
	:: dummy!85	// send byte value 85 to the channel
	:: dummy!170	// send byte value 170 to the channel
	od
}