From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Damien Mattei Newsgroups: gmane.lisp.guile.user Subject: Re: cond clause does not allow definitions Date: Wed, 22 May 2024 22:34:32 +0200 Message-ID: References: <5d1be852da93dd324fdbcaa24ed1b444@aleph0.info> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15452"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user To: Jeronimo Pellegrini Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed May 22 22:34:59 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s9sfr-0003kz-DG for guile-user@m.gmane-mx.org; Wed, 22 May 2024 22:34:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9sfg-00042f-HW; Wed, 22 May 2024 16:34:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9sfe-00042U-PY for guile-user@gnu.org; Wed, 22 May 2024 16:34:46 -0400 Original-Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9sfd-0002If-5I for guile-user@gnu.org; Wed, 22 May 2024 16:34:46 -0400 Original-Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-6a8691d736cso9280296d6.0 for ; Wed, 22 May 2024 13:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716410084; x=1717014884; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nR22MvHeHf/EBuTAHCk+YICglrSyD9M4T30yBSFHg30=; b=VQBJz3LiUpbazt3g4Bnt2nQecaKHXukaVzgHx0QelcnvkIFrId2xivYCrYkes7fO50 gT9OtNz5TyraG79Z/mgnuVegj4pR5LV42qwffUCQXCaiQBZSmWe1mj9ru49fzuZltWc/ 30Av1pAVY4qqic+9DBW1+hyJ0so+jwbTEUOE0n+6yz1P1Vl3u7x2JoH5bqfPmTnOy7bX YLOg+Y5i+Hw417Df41SKuWXEbVcVNuHzybgXN9Ule9ZhIsJt1ykScZbFHjuAPQ1NM0yS RT9BWWpGu6yXhvST+skcVH+h3EeHJ3zsmo4bQFYwrC3ooayEPXotp05TYj6WtSNc10IG DQtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716410084; x=1717014884; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nR22MvHeHf/EBuTAHCk+YICglrSyD9M4T30yBSFHg30=; b=d4u/AHaG4VdVIF+ubf/EwrWrsS/35ouQNbEggIy8EybNqmdBtEXzHRmCRawVQ/FDtO KoTdEQJhilJ1LzTG7nHhrfI+qXyvDKFuHKTNUQS66r4xWBbp7UDKGSYon3HKv1spFIfZ yilfsXd8JKZxr2N9ETHs05boZ4NdJEK47qQo3vJ/yrW8yMsIt1bq5D/MTdcjhr8WUsiE wUcpa2K4YSqyPpK4cAOlGxz8MY7u9iRzOwxtgK0m69gzk3UApZX+WZggja6D0Th7i1pQ ts1AY8+chMwa2EKQbyZpA7dZ/7Bb8ZDUWR87Lgp8TvVjxVcqFMpEj0YWdx01fpN01XN+ MW7Q== X-Gm-Message-State: AOJu0YxHu1/hJVreDRZaIV3PdIe4x2r9vzyLZtDXUu1iFrSGga2pCtwr D7sVsGAL438M7k4RPX6YG5ANTj2PdHbmsBCyOsLPK//F363p6Z787XdA2Ge+OeKGpBYLSHltAx5 +d12bihNndwloZkXh2kyazlMKM+vRTw== X-Google-Smtp-Source: AGHT+IERDcg6iH4stFvsQnoSL2FwutvVlol+jDvx8vd83dzX5acnCpmFLicjVUj2IJ7rZrcY+TFMaf8jCP/CmwcWgMo= X-Received: by 2002:a05:6214:5d11:b0:6aa:d1f6:bb54 with SMTP id 6a1803df08f44-6ab8f57dde5mr7322446d6.1.1716410084049; Wed, 22 May 2024 13:34:44 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::f2c; envelope-from=damien.mattei@gmail.com; helo=mail-qv1-xf2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19676 Archived-At: i wanted to write 'than your' not 'than you' :-/ On Wed, May 22, 2024 at 10:33=E2=80=AFPM Damien Mattei wrote: > Bonjour, > > so it is with the version i currently use which is older than you: > (base) mattei@mbp-touch-bar library-FunctProg % guile > GNU Guile 3.0.8.99-f3ea8 > Copyright (C) 1995-2022 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)> (cond (#t (define x 7) x)) > While compiling expression: > Syntax error: > unknown file:1:10: definition in expression context, where definitions ar= e > not allowed, in form (define x 7) > > thanks > > On Wed, May 22, 2024 at 10:07=E2=80=AFPM Jeronimo Pellegrini > wrote: > >> Hello! >> >> On 2024-05-22 16:26, Damien Mattei wrote: >> > scheme@(guile-user)> (cond (#t (define x 7) x)) >> > While compiling expression: >> > Syntax error: >> > unknown file:7:10: definition in expression context, where definitions >> > are >> > not allowed, in form (define x 7) >> >> I get no error here (Guile 3.0.9.164-e1690, compiled locally): >> >> scheme@(guile-user)> (cond (else (define x 7) x)) >> $1 =3D 7 >> scheme@(guile-user)> (cond (#t (define x 7) x)) >> $2 =3D 7 >> >> A: (cond (#t (define x 7) x)) >> B: (cond (else (define x 7) x)) >> >> | system | A | B | >> |-------------|-------|-------| >> | Bigloo | 7 | 7 | >> | Biwa | 7 | 7 | >> | Chez | error | 7 | >> | Chibi | error | 7 | >> | Chicken | 7 | 7 | >> | Cyclone | 7 | 7 | >> | Gambit | error | error | >> | Gauche | 7 | 7 | >> | Guile | 7 | 7 | >> | Kawa | 7 | 7 | >> | LIPS | 7 | error | >> | Loko | error | error | >> | MIT | error | 7 | >> | Racket | 7 | 7 | >> | Sagittarius | 7 | 7 | >> | Scheme48 | error | 7 | >> | Scheme 9 | error | 7 | >> | SCM | 7 | 7 | >> | STklos | 7 | 7 | >> | Tinyscheme | 7 | 7 | >> >> * LIPS does not recognise the 'else' clause. >> >> J. >> >