On Tue, Jul 18, 2023 at 3:58 PM Jean Abou Samra <j...@abou-samra.fr> wrote:

> Hi Trevor,
>
> In Scheme, the = function is for comparing numbers, and nothing else. For
> colors, you want equal? .
>
>
> ~ $ guile2.2
> GNU Guile 2.2.7
> Copyright (C) 1995-2019 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (= 1 2)
> $1 = #f
> scheme@(guile-user)> (= 1 1)
> $2 = #t
> scheme@(guile-user)> (= 1 1.0)
> $3 = #t
> scheme@(guile-user)> (= 'a 'b)
> <unnamed port>:4:0: In procedure =: Wrong type argument in position 1: a
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> ,q
> scheme@(guile-user)> (equal? 1 2)
> $4 = #f
> scheme@(guile-user)> (equal? 1 1)
> $5 = #t
> scheme@(guile-user)> (equal? 1 1.0)
> $6 = #f
> scheme@(guile-user)> (equal? 'a 'b)
> $7 = #f
>
>
Hi Jean,

Thank you so much; exactly what I needed to know.

Trevor.


-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca

Reply via email to