Post

2 followers Follow
0
Avatar

bug with IF calculation

Hello,

Can someone help me?
It works when it's bigger than 1 but not when it's below 0 (like 0.6) :(

Isabelle Schmitz

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Isabelle,

0.6 is not below 0, it's >  0  - and cause 0.6 is neither  <  0 nor > 1 the code returns nothing. 

var  result1 = @Com People;
var result2 = @Net Presta people SANS pret;
var pLp = @% pour le people;
pLp > 0 ? result2 : result1

This returns result2 if pLp > 0, if < 0 it returns result1. 
What should it return if pLp == 0? 

Rainer 

Rainer Grabowski 0 votes
Comment actions Permalink