View previous topic :: View next topic |
Author |
Message |
harrys Newbie
Joined: 25 Feb 2007 Posts: 22
|
Posted: Wed Dec 24, 2014 6:49 pm Post subject: how do you do this? |
|
|
psst, anybody...
so i need to have some output between these 2 points
Code: | IF @equal(%%VIS,3)
DIALOG SET,TEXT12, Working Temp
END
IF @equal(%%VIS,6.6)
DIALOG SET,TEXT12, Softening Temp
END |
that is telling the user the operational characteristic of the
fluid by viscosity...
when between the fixed points (and 2 decimal points 0.25)
i've tried this
Code: | IF
@equal(%%VIS,6.7) @equal(%%VIS,6.8) @equal(%%VIS,6.9)
DIALOG SET,TEXT12, Near Softening Temp
END |
but thats a lot of code since its 1- 13.5
is there a better way?
thanks |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sat Dec 27, 2014 9:33 pm Post subject: |
|
|
Hello Harry, thanks for your returned visit
I believe you can use @greater() even for floating point numbers (numbers containing a comma or period), just as long as the decimal separator is set right (it will differ depending on regional settings).
This works:
Code: | option decimalsep,"."
info " "@greater(5.5,3.5)
rem Shows one
info " "@greater(3.5,5.5)
rem Show empty box |
So in your case the solution might be:
Code: | option decimalsep,"."
if @both(@greater(%%VIS,0.9),@not(@greater(%%VIS,13.5)))
info Working Temp
else
info Softening Temp
end |
|
|
Back to top |
|
|
harrys Newbie
Joined: 25 Feb 2007 Posts: 22
|
Posted: Mon Jan 05, 2015 10:26 pm Post subject: |
|
|
thanks Tommy!
that looks like its the ticket!!
harry |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|