Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scheme help (unbound error)
#3
(12-21-2017, 09:25 PM)Ofnuts Wrote: Far from a Scheme expert(*), but I would expect to do something like:
Code:
(if (> ((string-length g1Text)  0)
that would entirely side-step the issue.

++ No dice, it seems that Scheme really doesn't want if clauses in the variable declaration section of its Let statement.

(12-21-2017, 09:25 PM)Ofnuts Wrote: Also it is usually considered good style to use "guard clauses" to avoid putting the bulk of the code in a nested condition. In other words, instead of doing:

++ Yeah, I know. I tried but I couldn't find the scheme version of return or exit so I just trudged ahead with that mess.

(12-21-2017, 09:25 PM)Ofnuts Wrote: (*) We are in the third millennium, why don't you use Python instead of a 1950-era language?

++ Haha, believe me I wish I had. When I first started looking at writing a Gimp plugin it appeared Scheme had more tutorials and was better supported so I just went with it. Believe me, I regret the decision.
Reply


Messages In This Thread
Scheme help (unbound error) - by ssallen - 12-21-2017, 08:31 PM
RE: Scheme help (unbound error) - by Ofnuts - 12-21-2017, 09:25 PM
RE: Scheme help (unbound error) - by ssallen - 12-21-2017, 09:41 PM
RE: Scheme help (unbound error) - by Ofnuts - 12-21-2017, 10:47 PM

Forum Jump: