Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| intro_example:pure_struct [2025/05/07 18:30] – [Methods] rajit | intro_example:pure_struct [2025/05/18 15:07] (current) – rajit | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Using pure structures ====== | ====== Using pure structures ====== | ||
| - | A [[language: | + | A [[language: |
| + | make CHP more human-readable. An example of a pure structure is: | ||
| <code act> | <code act> | ||
| Line 56: | Line 57: | ||
| - | defproc cache(chan? | + | defproc cache(chan? |
| { | { | ||
| | | ||
| Line 93: | Line 94: | ||
| } | } | ||
| } | } | ||
| - | | + | |
| valid+; | valid+; | ||
| data := dv; | data := dv; | ||
| Line 101: | Line 102: | ||
| } | } | ||
| - | defproc cache(chan? | + | defproc cache(chan? |
| { | { | ||
| | | ||
| Line 117: | Line 118: | ||
| | | ||
| | | ||
| - | ce.setaddr | + | ce.setval |
| | | ||
| ] | ] | ||