mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 16:57:46 +03:00
bb58d11ca8
implements #357
27 lines
581 B
Plaintext
27 lines
581 B
Plaintext
```catala
|
|
declaration scope Toto:
|
|
context bar content integer
|
|
output foo content integer
|
|
|
|
scope Toto:
|
|
definition bar equals 1
|
|
definition foo equals 1212 + bar
|
|
|
|
declaration scope Titi:
|
|
output fizz content Toto
|
|
output fuzz content Toto
|
|
toto scope Toto
|
|
|
|
scope Titi:
|
|
definition toto.bar equals 44
|
|
definition fizz equals output of Toto
|
|
definition fuzz equals output of Toto with {--bar: 111}
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s Titi
|
|
[RESULT] Computation successful! Results:
|
|
[RESULT] fizz = Toto { "foo"= 1213 }
|
|
[RESULT] fuzz = Toto { "foo"= 1323 }
|
|
```
|