Hi,
when testing conjunction of boolean expressions in a program, it seems that Xcas evaluates all operands even if the first one is false. This makes the following code erroneous:
Namely, lst[0]==0 is checked even if size(lst)==0. Since it seems that Xcas programming language adopts several C standards, it would be nice that conjunction testing is optimized so that expressions are evaluated in given order, stopping after first one that evaluates to false (as in C). That could not break existing programs and would make programming in Xcas much more easy in some cases. For example, in the current version the above code needs to be rewritten using nested if-clauses:
which is somewhat awkward. Is there a more compact way to write a piece of code similar to the one above? Maybe I'm missing something...