TEXT in case constraint

Maria Matejka maria.matejka at nic.cz
Sat Sep 3 18:03:15 CEST 2022


Hello!

On 9/3/22 16:08, Mikhail Mayorov wrote:
> function casetest(string aaa)
> {
>      if aaa ~ "a1" then print "ok";
>      case aaa {
>      "a1" : print "a1";
>      "b1" : print "b1";
>      else: print "not a1, nor b1";
>      }
> }
> 
> Sometimes it will be comfortable. Why it is error?

The "case" construction creates a balanced binary decision tree for fast 
lookup by integer value. Lookup by string isn't implemented, therefore 
it's an error.

Patches welcome after relasing the next version of BIRD 2. If anybody 
wants to discuss how to implement it, just let me know by replying to 
this e-mail.

Maria
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2839 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20220903/422d6539/attachment.p7s>


More information about the Bird-users mailing list