From: Mortimer Cladwell <mbcladwell@gmail.com>
To: guile-user@gnu.org, tomas@tuxteam.de
Subject: Re: Re: intern a top level variable
Date: Wed, 16 Aug 2023 10:55:05 -0400 [thread overview]
Message-ID: <CAOcxjM6m_kO=o6e-fYdSkvG4znEkjeT+D-jwjeMk8bpAFTvOGw@mail.gmail.com> (raw)
I would like to intern and assign a value within a method:
(define (test-intern)
(let* ((name "abc")
(data "def")
(name-symbol (gensym name))
)
(pretty-print (string-append "symbol: " (symbol->string name-symbol)))
(set! name-symbol data)))
scheme@(guile-user)> (test-intern)
"symbol: abc3301"
scheme@(guile-user)> abc3301
;;; <unknown-location>: warning: possibly unbound variable `abc3301'
ERROR: In procedure module-lookup: Unbound variable: abc3301
Thanks
next reply other threads:[~2023-08-16 14:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 14:55 Mortimer Cladwell [this message]
2023-08-16 16:13 ` Re: intern a top level variable Jean Abou Samra
2023-08-16 17:58 ` tomas
2023-08-16 19:17 ` Mortimer Cladwell
2023-08-16 20:35 ` Taylan Kammer
2023-08-17 6:07 ` Mortimer Cladwell
2023-08-20 13:56 ` Jean Abou Samra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOcxjM6m_kO=o6e-fYdSkvG4znEkjeT+D-jwjeMk8bpAFTvOGw@mail.gmail.com' \
--to=mbcladwell@gmail.com \
--cc=guile-user@gnu.org \
--cc=tomas@tuxteam.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).