Hi,
I am trying to do something basic, but can't work out what I am doing wrong (one of those days).
I am trying to make it log the correct value based on value1.
In the above example it should log 'Good' since it's between -71 and -85. However it logs 'Fair' when I run the above code.
I am thinking it has something with the number being a negative number.
Anyone know what I am doing wrong. Should I be doing this another way ?
I am trying to do something basic, but can't work out what I am doing wrong (one of those days).
B4X:
Dim value1 As Int = -71
If (value1 >= -1) And (value1 <= -70) Then
Log("EXCELLENT")
Else If (value1 >= -71) And (value1 <= -85) Then
Log("GOOD")
Else If (value1 >= -86) And (value1 >= -100) Then
Log("FAIR")
Else If (value1 >= -101) And (value1 >= -140) Then
Log("POOR")
End If
I am trying to make it log the correct value based on value1.
In the above example it should log 'Good' since it's between -71 and -85. However it logs 'Fair' when I run the above code.
I am thinking it has something with the number being a negative number.
Anyone know what I am doing wrong. Should I be doing this another way ?