### Less Than, Greater Than

Posted:

**Thu 04 Apr 2019, 15:48**Hi.

I was just playing around with a loop which required a value of a variable to be between two values. The normal way seems to be a double expression, i.e.

UNTIL A% > 10 AND A% < 20

Is there any way a combined expression could be used? I.e.

[ UNTIL 10 < A% < 20 ]

I tried playing around with various formats/parentheses, but was unable to come up with any combination that worked. Is this one of those examples that just wont work in BASIC?

Matt

I was just playing around with a loop which required a value of a variable to be between two values. The normal way seems to be a double expression, i.e.

UNTIL A% > 10 AND A% < 20

Is there any way a combined expression could be used? I.e.

[ UNTIL 10 < A% < 20 ]

I tried playing around with various formats/parentheses, but was unable to come up with any combination that worked. Is this one of those examples that just wont work in BASIC?

Matt