dimanche 26 février 2017

Guarded Command Language- IF statement

I am new to Guarded command language. I have a program in Guarded command language. x and y are the variables

Do :: x>y) IF :: x-y =5 ) y:=y-1
              :: x<=0 ) x:=x-1
           FI
OD

The example selected here is x = 0 and y = -2. Both the statements in IF loop are satisfied, then how does the program work? Which statement(s) will be executed?

Regards, Riya208

Aucun commentaire:

Enregistrer un commentaire