Thanks for all the replies.

I also found the strcmp function which does a string
compare.

Thanks,
Lajos



Quoting Jeffrey Brent McBeth <[EMAIL PROTECTED]>:

> On Wed, Apr 14, 2004 at 02:52:35PM -0700, Lajos Kamocsay wrote:
> >
> >
> > Hello,
> >
> > I'd like to compare a string variable to a constant string
> > in script fu using gimp 1.2.3, but I can't figure out how.
>
> IIRC, the function you are looking for is
>
> equal?
>
> A often made mistake in LISP/Scheme dialects is to assume that
> =, eq, eqv, equal   mean the same thing.
>
> = is comparing the objects and the object a and the object "hello" are
> definitely not the same thing.
>
> equal? will step through the collection and test for equivalent objects (all
> the characters are the same)
>
> Jeff
>
> >
> > Here's what I tried in the console:
> >
> > => (set! a "hello")    ; set a to "hello"
> > "hello"
> >
> > => a       ; check value of a
> > "hello"
> >
> > => (= a "hello")    ; check if a = "hello"
> > ()
> >
> > => (= a "nothello")  ; check if a = "nothello"
> > ()
> >
> > Script-fu always returns () instead of a true value.
> >
> > What am I missing?
> >
> >
> > Thanks,
> > Lajos
> >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> > _______________________________________________
> > Gimp-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user
>
> --
> ----------------------------------------------------------------------------
> Computer Science is as much about computers as astronomy is about telescopes
>       -- Edsger Wybe Dijkstra (1930-2002)
> ----------------------------------------------------------------------------
>




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Gimp-user mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-user

Reply via email to