case & string
Mikhail Mayorov
mm at tagan.ru
Tue Oct 8 11:16:42 CEST 2024
Hi!
I try use CASE and string variable and a have error.... I checked User's
guide 2.0 <https://bird.network.cz/?get_doc&f=bird.html&v=20>.... CASE
use operator ~. This operator applies to string variables. What am I
doing wrong?
[root at wine etc]# cat 123.conf && bird -c ./123.conf -p
function teststring(string myvar) -> bool
{
case myvar {
"text A" : print "A"; return true;
"text B" : print "B"; return true;
"text C" : print "C"; return true;
else : print "unknown"; return false;
}
}
bird: ./123.conf:4:12 syntax error, unexpected TEXT
--
Regards,
Mikhail Mayorov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20241008/8634b017/attachment.htm>
More information about the Bird-users
mailing list