mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 17:10:22 +03:00
38 lines
673 B
Plaintext
38 lines
673 B
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope A:
|
|
context output x content decimal
|
|
context output y content decimal
|
|
context output z content decimal
|
|
output k content decimal
|
|
|
|
scope A:
|
|
definition x equals 84.648665
|
|
definition y equals 4.368297
|
|
definition z equals x / y
|
|
definition k equals 1/3
|
|
```
|
|
|
|
|
|
|
|
```catala-test-inline
|
|
$ catala Typecheck --check-invariants
|
|
┌─[RESULT]─
|
|
│ All invariant checks passed
|
|
└─
|
|
┌─[RESULT]─
|
|
│ Typechecking successful!
|
|
└─
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala test-scope A
|
|
┌─[RESULT]─
|
|
│ k = 0.333,333,333,333,333,333,33…
|
|
│ x = 84.648,665
|
|
│ y = 4.368,297
|
|
│ z = 19.377,955,528,206,987,757…
|
|
└─
|
|
```
|