Maybe this is already answered in here, but a search for "return" didn't uncover it. How do I return a value from a GIMP (scheme) script? I know there is a simple way to do it, and I remember seeing it in a script once, but I don't remember which one, so I don't know how to do it.
This is partial code for a script. I want to be able to return all three GIMP release/version/minor version values. I already have code that does what I want, except I don't know how to return the values.
How do I return values from a script that will work in 2.6.x and higher (I want to be backwards compatible to 2.6.x)? Sorry if this is a stupid question. Thanks for any help.
; no input arguments
; all variables will be defined here, but not all shown...
(relVerGimp ()) ; Full GIMP version i.e. 2.6.12, 2.7.5, or 2.8.0
(numRelGimp ()) ; numeric value of Release (i.e. 2)
(numVerGimp ()) ; numeric value of Version (i.e. 6)
(numMinorRelGimp ()) ; numeric value of Minor Release (i.e. 12)
) ; end of variable definitions
; Save the current release/version for GIMP into a string, etc. (not all code shown)
(set! relVerGimp (car(gimp-version)))
; Parse the string into its character components, then convert to numeric.
) ; end of let
; Return values
; Note: I want to be able to return numRelGimp, numVerGimp, numMinorRelGimp
) ; end define getRelVerGIMP