>do case && journey's > > case empty(j_start) .and. empty(j_end) .and. empty(j_andor) > * do nothing > > case j_andor="OR" .and. !empty(j_start) > * but test that both times are not empty > if empty(j_end) && ignore the OR > expr=expr+".and."+ opjrny+j_start > else > expr=expr+".and. ("+opjrny+j_start+".or." ; > +opjrny+j_end+")" > endif > > case j_andor="OR" .and. empty(j_start) > * ignore the OR > if !empty(j_end) > expr=expr+".and."+opjrny+j_end > endif > > case empty(j_andor) > if !empty(j_start) > expr=expr+".and."+ opjrny+j_start > endif > if !empty(j_end) > expr=expr+".and."+ opjrny+j_end > endif >endcase >Just j_andor isn't equal to [OR] and it is not empty. If it is equal to [AND] none of these will be satisfied.