android & benitlux: use NitObject in clients
[nit.git] / contrib / pep8analysis / tests / terrasa / if_elseif_else.pep
1 ; Branchements
2 ; Programme qui affiche si le nombre saisi par l'utilisateur est égal à 0 ou non
3 ;
4 ; Alexandre Terrasa (c) 2013
5
6          deci    nb, d       ; nb = deci()
7          lda     nb, d       ; A = nb
8          deco    nb, d       ; print(nb)
9          
10          cpa     zero, i     ;
11          breq    eq0         ; if( A != 0 ) {
12          cpa     zero, i     ;
13          brgt    gt0         ;    if( A < 0 ) {
14          stro    strLt0, d   ;        print(strLt0)
15          stop                ;    } else {
16 gt0:     stro    strGt0, d   ;        print(strGt0)
17          stop                ;    }
18                              ; } else {
19 eq0:     stro    strEq0, d   ;    print(strEq0)
20          stop                ; }
21
22 ; variables
23 nb:      .block  2           ; on reserve 2 block pour l'entier saisi
24 strLt0:  .ascii  " est negatif\x00"
25 strEq0:  .ascii  " est nul\x00"
26 strGt0:  .ascii  " est positif\x00"
27 zero:    .equate 0           ; constante pour le test de branchement
28
29          .END