I'm using Pike v8.0 release 1738 on Debian 12.9.

I got this:

```
int x;
x = has_value(({ 1, 2, 3, 4 }), -100); // result: 0
x = has_value(({ 1, 2, 3, 4 }), 0); // result: 0
x = has_value(({ 1, 2, 3, 4 }), 4); // result: 1
x = has_value(({ 1, 2, 3, 4 }), 5);
Compiler Error: 1: Bad argument 2 to has_value.
Compiler Error: 1: Expected: int(0..4).
Compiler Error: 1: Got     : int(5..5).
```

I expected a result of 0 also with numbers greater than 4, after the
documentation
(http://pike.lysator.liu.se/generated/manual/modref/ex/predef_3A_3A/has_value.html#has_value).

Is it a bug or am I missing something?

Thank you in advance.

-- 
Marcos Cruz
http://programandala.net

Reply via email to