Skip to content

Commit

Permalink
Define how "Assert:" works
Browse files Browse the repository at this point in the history
See #87 for direct inspiration, though we’ve been using this here and
there for a while now.
  • Loading branch information
annevk committed Mar 23, 2017
1 parent 139484a commit c25e15a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions infra.bs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,18 @@ iteration.
</div>


<h3 id=assertions>Assertions</h3>

<p>To improve readability, it can sometimes help to add assertions to algorithms, stating
invariants. To do this, write "<code>Assert: </code>", followed by a statement that must be true.

<div class=example id=example-assert>
<ol>
<li><p>Let |x| be "<code>Aperture Science</code>".
<li><p>Assert: |x| is "<code>Aperture Science</code>".
</div>


<h2 id=primitive-data-types>Primitive data types</h2>

<h3 id=bytes>Bytes</h3>
Expand Down

0 comments on commit c25e15a

Please sign in to comment.