Inform 6 - comparing array values

I’m trying to check whether the_time is between two values stored in an array. I get an error about bracketing when compiling the following code.

if (~~((g.&when–>0) < the_time < (g.&when–>1)))

What am I doing wrong?

I’m pretty sure you can’t chain comparisons like that. You will need to do this:

if (~~((g.&when-->0) < the_time && the_time < (g.&when-->1)))

Ah, I see. Unfortunately that still throws the same error, though.

What is the exact error message?

This one:

if (~~(((g.&when-->0) < the_time) && (the_time < (g.&when-->1))))

Thank you!