Question: Problem with "if value in RealRange"

Hi, I'm trying to create a procedure like this;

f:=proc(a);
if a in RealRange(0,1) then a else no;
end if;
end proc;

 But when I try with f(0.5); for instance, I get the error: 

Error, (in f) cannot determine if this expression is true or false: .5 in RealRange(0, 1)

What am I doing wrong here, why can Maple not determine this?

Thank you! 

Please Wait...