Thursday, February 4, 2010

Gimp Coding


Today we learned gimp coding
GIMP CODING:
Gimp language- foo, Scheme
Coding:
Variable
Methods
Loops
Conditions if
Bold x = multiply for examples
VARIABLES: x,y,z; z=x+y; function add(x, y) for Gimp- (+ x y)
In englsish: x+(y x z) in scheme: (+x(x y z)
(define x 6)- variable with 6 stored in x
Or another way to make variables-temporary variables (let* ((x6)(y7))
METHODS: (define x 6)
(define (funcname param1 p2……)
Body.
)

LOOPS:
For Loop:
(let LoopName ((i 0))
(if (not(=i 10))
(Begin
……………
(LoopName (+ i 1))

If it’s false then this is true(not)

Z=x+y
(let* (( x 1) (y 2) (z))
(set! Z (+ x y))
)

No comments:

Post a Comment