1\  Test an imbalanced control statement before a device-node change
2
3
4fcode-version2
5hex
6headers
7
8alias rc! rb!
9
10[message]  Top-Level (root) device-node
11create achin  12 c, 13 c, 14 c,
12: breakin  achin 3 bounds do i c@ . loop ;
13: creakin     0 if breakin then ;
14: deacon   achin creakin drop breakin ;
15
16[message]  Control structure starts here
173 0 do
18    i ." loop number" .
19[message]  Forgot the "loop" here.
20
21[message]  Subsidiary (child) device-node
22new-device
23create eek!  18 c, 17 c, 80 c, 79 c,
24: freek  eek! 4 bounds ?do i c@ . 1 +loop ;
25: greek
26        recursive -1 if ." By name" greek
27                        ." other name" freek
28        else  ." Re-Curse you!"  recurse
29	then
30;
31[message]  About to access method from parent node
32: hierareek
33       eek!
34           freek
35	       achin
36	           greek
37;
38: ikey  hierareek  freek  greek ;
39[message]  about to end child node
40[message] But first a bogus incomplete control structure
41false if
42    ." This should not be happening"
43[message] "Forgot" the then here...
44finish-device
45[message]  We can access methods from the root node now
46: jeeky
47     achin
48       3 type
49;
50[message] Proved our point I think.
51
52[message] Another bogo-crol
53    begin   ." What the hey?"  0 while
54        ."  Forgot it again..."
55[message]  Missing repeat...
56
57
58fcode-end
59