This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

4 byte floating point two values comparison
#1
Hi, 

how to make comparison of 2 values 14 type 4 byte floating point?

Simple comparison not working for me.

currentprice and price are 4 byte floating point values.
  

If currentprice > price then
    grp.write ('35/5/20', 1)
  else
  grp.write ('35/5/20', 0)
    end

BR,

Alex
Reply
#2
Post your whole script.
Reply
#3
value = event.getvalue()
if value then

currentprice = grp.getvalue('35/5/17')
price = grp.getvalue('35/5/18')
If currentprice > price then
grp.write('35/5/20', 1)
else
grp.write('35/5/20', 0)
end
end
Reply
#4
if should be lowercase
Reply
#5
Smile Thank you, I did very serious mistake Smile

Alex
Reply


Forum Jump: