Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
language:migrate [2022/02/05 11:41]
rajit [Channel and data type bodies]
language:migrate [2022/05/13 11:22]
rajit [Array expressions]
Line 21: Line 21:
  
 The old ACT only had single-assignment parameters. So  The old ACT only had single-assignment parameters. So 
-<code>+<code act>
 pint x; pint x;
  
Line 28: Line 28:
 </code> </code>
 would result in an error. This was sometimes used to implement assertions. For example, if a parameter ''x'' was supposed to be twice another parameter ''y'', then would result in an error. This was sometimes used to implement assertions. For example, if a parameter ''x'' was supposed to be twice another parameter ''y'', then
-<code>+<code act>
 x=2*y; x=2*y;
 </code> </code>
Line 34: Line 34:
  
 The new ACT supports [[language:connections|mutable parameter]] variables in restricted contexts. To support the assertion feature, the new ACT supports explicit assertions. We use Hoare's syntax, and so the assertion  specified earlier would be written The new ACT supports [[language:connections|mutable parameter]] variables in restricted contexts. To support the assertion feature, the new ACT supports explicit assertions. We use Hoare's syntax, and so the assertion  specified earlier would be written
-<code>+<code act>
 {x=2*y}; {x=2*y};
 </code> </code>
 If a more meaningful message is required, the following syntax is also supported: If a more meaningful message is required, the following syntax is also supported:
-<code>+<code act>
 {x=2*y : "This assertion failed"}; {x=2*y : "This assertion failed"};
 </code> </code>
Line 46: Line 46:
  
 In the previous version of ACT, one could do the following: In the previous version of ACT, one could do the following:
-<code>+<code act>
 bool x[2][2]; bool x[2][2];
 bool y[2]; bool y[2];
Line 59: Line 59:
 </code> </code>
 Instead, you can get the same effect by saying: Instead, you can get the same effect by saying:
-<code>+<code act>
 x[0][0..1] = y; x[0][0..1] = y;
 </code> </code>