Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
language:langs:chp [2022/08/02 19:59]
rajit [An example]
language:langs:chp [2022/08/02 20:01] (current)
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 ] 
 +}
 </code> </code>
 would be written in ''chp-txt'' as would be written in ''chp-txt'' as
 <code act> <code act>
-forever +chp-txt 
-   L?x; R!x+   forever { 
 +      L?x; R!x 
 +   }
 } }
 </code> </code>
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 ] ] 
 +}
 </code> </code>
 would be written would be written
 <code act> <code act>
-forever +chp-txt 
-   recv (L, x); +   forever { 
-   select { +      recv (L, x); 
-     case x > 0 : send (R, x); +      select { 
-     else : skip+        case x > 0 : send (R, x); 
 +        else : skip 
 +      }
    }    }
-}+  
 </code> </code>
- 
-