Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| language:connections [2023/04/09 23:10] – [Simple connections] rajit | language:connections [2023/04/09 23:13] (current) – [Assertions] rajit | ||
|---|---|---|---|
| Line 77: | Line 77: | ||
| defined once. | defined once. | ||
| - | ===== Assertions ===== | ||
| - | |||
| - | Sometimes it is useful to be able to check that a parameter (or an expression of parameters) has a reasonable | ||
| - | value. To express this, ACT supports explicit assertions. We use Hoare' | ||
| - | '' | ||
| - | <code act> | ||
| - | {x=8}; | ||
| - | </ | ||
| - | If a more meaningful message is required, the following syntax is also supported: | ||
| - | <code act> | ||
| - | {x=8 : "This assertion failed" | ||
| - | </ | ||
| - | which also reports the message specified when the assertion failed. | ||
| - | |||
| - | During circuit development/ | ||
| - | other or in fact disconnected from each other at a particular point during circuit construction. To assert that '' | ||
| - | <code act> | ||
| - | bool a; | ||
| - | bool b; | ||
| - | |||
| - | { a !== b : "a and b are connected connected!" | ||
| - | a = b; | ||
| - | { a === b : "a and b are not connected!" | ||
| - | { a !== b : "a and b are connected connected!" | ||
| - | </ | ||
| - | |||
| - | The operators '' | ||
| ===== Array and subrange connections ===== | ===== Array and subrange connections ===== | ||