Order of evaluation of the conditions in an expression in an IF element

Order of evaluation of the conditions in an expression in an IF element

Hello all.
In an IF element I have the following expression:

inout_ListaHistoricoSituacaoFisica_JRL.Length > 0 and 
NovaSituacaoFisica_JRec.SITUACAO_FISICA.Id <>  inout_ListaHistoricoSituacaoFisica_JRL[0].SITUACAO_FISICA.Id

Basically I'm testing if the record list inout_ListaHistoricoSituacaoFisica_JRL has any elements and if true then test some condition on the first element ([0]) of that record list.
I would expect that the evaluation of these conditions in the expression would be left to right and as soon as the final value of the expression is known the flow would "exit".
Although, when the record list is empty, I'm getting the error "index 0 is out of range" that I assume is because of evaluating "inout_ListaHistoricoSituacaoFisica_JRL[0]".

What are the rules of the order of evaluation in an expression in a IF element, if there are any rules?
Or should I assume that there are not any rules when evaluating expressions and use to IF elements in the flow so that is I that explicitly determines the "order of evaluation".
(The first IF element would have inout_ListaHistoricoSituacaoFisica_JRL.Length > 0 or (not inout_ListaHistoricoSituacaoFisica_JRL.Empty) and if true the second IF element would have NovaSituacaoFisica_JRec.SITUACAO_FISICA.Id <>  inout_ListaHistoricoSituacaoFisica_JRL[0].SITUACAO_FISICA.Id)

Thank you.
Just discovered that the problem was not in the IF but in an assign more "down" in the flow that tried to access inout_ListaHistoricoSituacaoFisica_JRL[0] when effectively the record list was empty.

So I guess that my assumption on the order of evaluation of the conditions in an expression is correct, but can anyone really confirm this.

Thank you.
Hi Tiago,

Yes, your assumption is correct, boolean operators have short-circuit evaluation.

Tiago Simões