Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need help to declare a variable or a function in scheme
#2
try VSC, free in linux, it's great, colored brackets for scheme help a lot.

this code will print 'value = 1' in the error console.
change #t to #f and it'll print 'value = 2'

Code:
(let*

(
   (value 0)
 )

   (set! value (if #t 1 2))
 
   (gimp-message (string-append "value = " (number->string value)))
)

maybe try: (set! isInteractive (if (equal? i 1) RUN-INTERACTIVE RUN-WITH-LAST-VALS))

I'd probably do this though, out of habit.


Code:
(if (= i 1) (set! isInteractive RUN-INTERACTIVE)
 (set! isInteractive RUN-WITH-LAST-VALS))
Reply


Messages In This Thread
RE: I need help to declare a variable or a function in scheme - by pixelmixer - 12-07-2023, 04:10 PM

Forum Jump: