Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
language:langs:chp [2022/08/02 19:59] rajit [An example] |
language:langs:chp [2022/08/02 20:01] rajit [An example] |
||
---|---|---|---|
Line 328: | Line 328: | ||
The CHP program: | The CHP program: | ||
<code act> | <code act> | ||
- | *[ L?x; R!x ] | + | chp { |
+ | *[ L?x; R!x ] | ||
+ | } | ||
</ | </ | ||
would be written in '' | would be written in '' | ||
<code act> | <code act> | ||
- | forever | + | chp-txt |
- | L?x; R!x | + | forever { |
+ | | ||
+ | } | ||
} | } | ||
</ | </ | ||
Line 339: | Line 343: | ||
The CHP program: | The CHP program: | ||
<code act> | <code act> | ||
- | *[ L?x; [ x > 0 -> R!x [] else -> skip ] ] | + | chp { |
+ | *[ L?x; [ x > 0 -> R!x [] else -> skip ] ] | ||
+ | } | ||
</ | </ | ||
would be written | would be written | ||
<code act> | <code act> | ||
- | forever | + | chp-txt |
- | recv (L, x); | + | forever { |
- | | + | |
- | | + | select { |
- | | + | case x > 0 : send (R, x); |
+ | else : skip | ||
+ | } | ||
} | } | ||
- | } | + | } |
</ | </ | ||
- | |||
- |