-
math question
Hello All,
In a program that i'm working on, I need to pick from a range of numbers. For example, If variable B1 returns a value of say 100, but you want to 98,99,100,101 or 102 to be acceptable, is this possible? show an example please. Thanks to all reading and responding!!
-
Re: math question
You could try using select case. Then you could say something like
select case B1
case 98 to 102
do something
end select
This is not tested but may work.
-
Re: math question
IF B1<B+2 AND B1>B-2 THEN do something here.
That should give you B +or- 2 which you would have to set to 100.
This may or not do what you want, but it might help.
-
Re: math question
using the very unknown SEARCH function of this forum ... :ambivalence:
http://www.picbasic.co.uk/forum/showthread.php?t=3625
Alain