main.aug
Read access and mutable borrows · 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
own Counter counter = Counter(value=1)
counter.increment()
print(value=counter.read())Compiled specification
Startup
It creates Counter with value 1 and stores the result in owned counter (Counter). It calls counter.increment. It prints counter.read. source
Dependencies
It uses Counter (increment and read) from counter.
Built-in operations follow the language reference.