PROGRAM booleen
IMPLICIT NONE 
 integer :: i=2, j=4
 logical :: cond
 ! exemple de comparaisons
 cond = (i == j)     ; print *, cond
 cond = (i /= j)     ; print *, cond
 cond = (i > j)      ; print *, cond
 cond = (i < j)      ; print *, cond
 cond = (i >= j)     ; print *, cond
 cond = (i <= j)     ; print *, cond
 ! exemple d'operations sur booleen
 cond = .NOT.(i <= j)           ; print *, cond
 cond = (i == j) .AND. (i /= j) ; print *, cond
 cond = (i == j) .OR. (i /= j)  ; print *, cond
END PROGRAM booleen
