Hi,

I found a solution to that problem: just in case, anyone is interested:

the command is qsort:

  (set! li '(4 6 2 3 8))
  (qsort li <)

gives

  (2 3 4 6 8)

you can even sort tables:

  (set! li '((4 a) (6 b) (2 c) (3 d) (8 e)))
  (qsort li < car)

gives

  ((2 c) (3 d) (4 a) (6 b) (8 e))

kind regards
Jan Würthner

-------- Original-Nachricht --------
Datum: Mon, 14 Aug 2006 17:03:45 +0200
Von: "Jan Wuerthner" <[EMAIL PROTECTED]>
An: gimp-user@lists.xcf.berkeley.edu
Betreff: [Gimp-user] script-fu

> 
> Hello all,
> 
> i am trying to do some scripting with gimp's scheme interpreter. Can
> anyone tell me how to sort a list? From the internet I found
> 
> (set! mylist '(10 3 12))
> (sort mylist <)
> 
> should give (3 10 12), but I get a "batch command: experienced an
> execution error."
> 
> by the way: Is there a better way to debug such a script? The error
> message is rather uninformative...
> 
> thanks in advance,
> kind regards
> Jan
> 
> -- 
> Jan Wuerthner
> Oddernskamp 15
> 22529 Hamburg
> [EMAIL PROTECTED]
> 
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> _______________________________________________
> Gimp-user mailing list
> Gimp-user@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

-- 
Jan Wuerthner
Oddernskamp 15
22529 Hamburg
[EMAIL PROTECTED]

Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to