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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to