Occam (programming language): Difference between revisions

Content deleted Content added
Hfastedge (talk | contribs)
No edit summary
m minor fixes
Line 1:
'''Occam''' is a parallel [[programming language]] developed by [[Inmos]] for their line of [[Transputer]]s. Implementations for other platforms exist as well.
 
Occam builds on [[Communication Sequential Processes]] and shares muchmany of the same features. It is, in a way, a practical implementation of CSP. Occam is a [[procedural programming|procedural]] language, similar to [[Pascal programming language|Pascal]] etc.
 
One feature (also found in [[Python programming language|Python]]) necessary to understand the examples below is that indentation and formatting is critical: expressions are terminated by the end of the line, listlists of expressions need to be on the same level of indentation.
 
The most interesting language constructs are described in the following.
Line 26:
y := y * 2
 
'''ALT''' specifies a list of ''guarded'' commands. The ''guards'' are combination of a boolean condition and an input expression (both optional). Each guard for which the condition is true and the input channel is ready is successful. One of the successful alternatives is selected for execution. Example:
 
ALT