Start a new topic

&& operator fail in last IDE


After a long month, i'm trying to change some part the Nextion 7" touch LCD display.

I've installed the last update but IDE con't compile and stop at this line :




 But it's work perfectly on the LCD compiled with an old IDE.

The full code :


  ref t5

 From "if" to ")" it's a single line.

Have you an idea ?


Le réparateur de PC


in general, such a "construct" is less optimal and should be avoided ...

    - in such a construct, to get a true or false condition all conditions must be tested ...
    - when using nested if statements instead, the next if is only executed and checked when the current is true ...



OK but why the IDE can't compile ? It's not an error but a bad practice ?

Have you an exemple code to solve it ?


Le réparateur de PC


  ref t5



1 person likes this


PFFFF why i've never think to this ????

Thanks !!!!!

Le réparateur de PC

I don't know ... ;-)

which version did this code ever work?

For the record:

In versions 0.33 and later of the Nextion Editor

   Compile traps the invalid complex evaluation and displays error.

In version 0.32 of the Nextion Editor

   The Compile process did not trap the invalid complex evaluation.

   but rather relied on the user to follow the instruction set and not

   use invalid statements in the user Event code.

The use of && has never been supported, only that v0.32 never tested

user statements to determine their validity, such invalid statement

would soon be known to be invalid when failure in Debug and Device

would not render the intended results.


Such an evaluation condition would short circuit only evaluating until

the first occurrence of 18  (p0.pic==18), result would be based on this

and this alone with the remaining discarded, ignored, unevaluated.

As such, this never worked, not even perfectly.

For Historical purposes, the if statement from v0.32




  t1.txt="password is correct"




  t1.txt="password error"



   The two braces must be on a separate line,

   Does not support nested if

   Does not support else

   Value type variable support

  1. Greater than (>)
  2. Less than (<)
  3. Equal to (==)
  4. Not Equal (!=)
  5. Greater than or Equal to (>=)
  6. Less than or Equal to (<=)
   String type only supports
  1. Equal to (==)
  2. Not Equal (!=)
   Must have strict beginning and ending parenthesis
   Does not support multiple parenthesis
   Only two variables directly evaluated
      - does not support calculation before evaluation
      - if(j0.val+1>0) This is not supported.
   If statement can only be written in user Event code
      - can not be transmitted over serial.
Login or Signup to post a comment