(if (condicion)
(statementIf)
(statementElse)
)
Algunos ejemplos son:
(if (= image-type 0)
(gimp-layer-set-mode layer-ufraw VALUE)
)
Este ejemplo comprueba si hay selección:
(PreSelec (car (gimp-drawable-mask-bounds inDrawable)))
(if (eqv? PreSelec TRUE)
(set! inOrientacion 3)
)
(if (equal? TRUE noselection)
(gimp-selection-none inImage)
(gimp-selection-load selchannel)
)
Si se quieren poner más de una sentencia en un if, hay, que llamar a dos funciones diferentes:
(if (< a b)
(FuntionThen arg1 a b)
(FuntionElse arg2 b a foo)
)
o bien utilizar la sentencia begin.
No hay comentarios:
Publicar un comentario