Debian Codegraph @

tests/test101.pe

raw
1 // This script prints 'Unexpected endif found' error message
2 // if $1 equals "1", after "aa" and "cc" is printed.
3
4 foo="1"
5 here=0
6 if ( foo == "1")
7 here=1
8 elseif ( foo == "2")
9 Error("Bad elseif 1");
10 else
11 Error("Bad elseif 2");
12 endif
13 if ( here==0 )
14 Error("Bad If")
15 endif
16
17 foo="2"
18 here=0
19 if ( foo == "1")
20 Error("Bad elseif 11");
21 elseif ( foo == "2")
22 here=1
23 elseif ( foo == "3")
24 Error("Bad elseif 12");
25 else
26 Error("Bad elseif 13");
27 endif
28 if ( here==0 )
29 Error("Bad If")
30 endif