mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 17:10:22 +03:00
33 lines
491 B
Plaintext
33 lines
491 B
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope A:
|
|
context output x content decimal
|
|
context output y content decimal
|
|
|
|
scope A:
|
|
definition x equals 4.0
|
|
definition y equals 1.0 + (x / 100.0)
|
|
assertion y = 1.04
|
|
```
|
|
|
|
|
|
|
|
```catala-test-inline
|
|
$ catala Typecheck --check-invariants
|
|
┌─[RESULT]─
|
|
│ All invariant checks passed
|
|
└─
|
|
┌─[RESULT]─
|
|
│ Typechecking successful!
|
|
└─
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala test-scope A
|
|
┌─[RESULT]─
|
|
│ x = 4.0
|
|
│ y = 1.04
|
|
└─
|
|
```
|