git @ Cat's Eye Technologies SixtyPical / 538365f
Add one more test case, to demonstrate that it's not just output. Chris Pressey 2 years ago
1 changed file(s) with 15 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
16061606 | }
16071607 = ok
16081608
1609 If a location is initialized in one block, is must be initialized in the other as well
1609 If a location is initialized in one block, it must be initialized in the other as well
16101610 in order to be considered to be initialized after the block. If it is not consistent,
16111611 it will be considered uninitialized.
16121612
16511651 | }
16521652 | }
16531653 ? UnmeaningfulOutputError: x
1654
1655 | define foo routine
1656 | inputs a
1657 | trashes a, x, z, n, c
1658 | {
1659 | cmp a, 42
1660 | if not z {
1661 | ld a, 6
1662 | } else {
1663 | ld x, 7
1664 | }
1665 | ld a, x
1666 | }
1667 ? UnmeaningfulReadError: x
16541668
16551669 If we don't care if it's uninitialized after the `if`, that's okay then.
16561670