Check if Number is in Range

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

How can I check if the number X is in range between Y and Z? For example 2 = Range(from 3 to 5) is FALSE and 2 = Range(form 1 to 3) is TRUE.
Or maybe X in tolerance +/- Y, for example 2 = Range(5, +/-2) is FALSE and 2 = Range(3, +/-2) is TRUE.

 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Nov 1, 2011
Company:

you can make a special function like this

Code
Function Range(Value, Min, Max)

    Return ?(Value>=Min And Value<=Max, True, False);

EndFunction

 
#3
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company: TLG Integration

Oh, thank you, Alexey! This works perfect for me!

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.