gobstones / gobstones-interpreter

[GobstonesWeb] The compiler for Gobstones language (wrongly named)
GNU General Public License v3.0
0 stars 4 forks source link

Expresiones condicionales #26

Closed foones closed 6 years ago

foones commented 6 years ago
    choose
        valor1 when (cond1)
        ...
        valorN when (condN)
        otroValor otherwise

Por ejemplo:

dir := choose Norte when (x == 1)
              Este  when (x == 2)
              Sur   when (x == 3)
              Oeste otherwise