PROLOG (VI) : La estructura condicional if-then-else

 


La estructura condicional if-then-else (si-entonces-sino) está implementada en PROLOG aunque tiene un formato singular.

true -> print(«then»); print(«else») se leería como «if true then print(«then») else «print(«else»)» así que devuelve then y true

false -> print(«then»); print(«else») se leería como «if false then print(«then») else «print(«else»)» devuelve else y truetrue *-> print(«true») ; print(«false»).

Para leer más:

No hay comentarios:

Publicar un comentario

INDICE DE TEMAS DEL BLOG 2023 - 2024 - 2025

  ¿Qué son los blogs SONOTRIGER-SOFTWARE y EA5JTT? Dispositivos Activos Amplificadores de RX (De bajo ruido - LNA) (Pocos o ninguno valen la...