main.aug
Private state and helpers · Source and specification
Files in this project
Code
aug
// aug-spec: "main.aug.md" explains this file. Read it before changes; refresh with aug spec.
import Counter from counter
counter = Counter(value=1)
print(value=counter.label())
borrow counter:
counter.value = 2
print(value=counter.value)Compiled specification
Startup
It sets counter to a Counter with value 1. It prints counter.label. With temporary permission to change counter, it sets counter.value to 2. It prints counter.value. source
Dependencies
It uses Counter (label and value) from counter.
Built-in operations follow the language reference.