catala/tests/test_scope/good/scope_call2.catala_en
Louis Gesbert bb58d11ca8 Improve syntax for scope calls
implements #357
2022-12-13 12:30:38 +01:00

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 }
```