mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-08 12:18:42 +00:00
Make configuration use new case statement.
This commit is contained in:
parent
2c1d1cc765
commit
4caa2231fc
11
bird.conf
11
bird.conf
@ -11,6 +11,12 @@ define xyzzy = 120+10;
|
|||||||
function callme (int arg1; int arg2;)
|
function callme (int arg1; int arg2;)
|
||||||
{
|
{
|
||||||
print "Function callme called arguments " arg1 " and " arg2;
|
print "Function callme called arguments " arg1 " and " arg2;
|
||||||
|
|
||||||
|
case arg1 {
|
||||||
|
2: { print "dva"; print "jeste jednou dva"; }
|
||||||
|
[ 3 .. 5 ]: print "tri az pet";
|
||||||
|
else: print "neco jineho";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function startup ()
|
function startup ()
|
||||||
@ -37,6 +43,11 @@ int i;
|
|||||||
print " false = " 1.2.3.4 ~ [ 1.2.3.3, 1.2.3.5 ];
|
print " false = " 1.2.3.4 ~ [ 1.2.3.3, 1.2.3.5 ];
|
||||||
|
|
||||||
callme ( 1, 2, );
|
callme ( 1, 2, );
|
||||||
|
callme ( 2, 2, );
|
||||||
|
callme ( 3, 2, );
|
||||||
|
callme ( 4, 2, );
|
||||||
|
callme ( 7, 2, );
|
||||||
|
|
||||||
print "done";
|
print "done";
|
||||||
quitbird;
|
quitbird;
|
||||||
print "*** FAIL: this is unreachable";
|
print "*** FAIL: this is unreachable";
|
||||||
|
Loading…
Reference in New Issue
Block a user