mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
36 lines
607 B
Plaintext
36 lines
607 B
Plaintext
```catala
|
|
declaration scope A:
|
|
output w content integer
|
|
output x content integer
|
|
output y content integer
|
|
output z content decimal
|
|
|
|
scope A:
|
|
definition w equals 4 - 2 - 2
|
|
definition x equals 4 - (2 - 2)
|
|
definition y equals 4 - 2 - -2
|
|
definition z equals 200 / 2 * 4. - 50. / - (5. - 20 / 2)
|
|
```
|
|
|
|
|
|
|
|
```catala-test-inline
|
|
$ catala Typecheck --check-invariants
|
|
┌─[RESULT]─
|
|
│ All invariant checks passed
|
|
└─
|
|
┌─[RESULT]─
|
|
│ Typechecking successful!
|
|
└─
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala test-scope A
|
|
┌─[RESULT]─
|
|
│ w = 0
|
|
│ x = 4
|
|
│ y = 4
|
|
│ z = 390.0
|
|
└─
|
|
```
|