1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// there is no assignment. to change x, undeclare it and declare it again
// if the new value depends on the old one, park it in a second variable first,
// because the old one is gone by the time you declare
::declare<::name<'x'>, ::decltype(::difference<'F', 'A'>)>::commit;
::emit<::decltype(::value_of<::name<'x'>>)>::commit;
::declare<
::name<'n', 'e', 'x', 't'>,
::decltype(::sum<::value_of<::name<'x'>>, ::difference<'B', 'A'>>)
>::commit;
::undeclare<::name<'x'>>::commit;
::declare<::name<'x'>, ::decltype(::value_of<::name<'n', 'e', 'x', 't'>>)>::commit;
::undeclare<::name<'n', 'e', 'x', 't'>>::commit;
::emit<::decltype(::value_of<::name<'x'>>)>::commit;
|