From: Clinton Ebadi <clinton@unknownlamer.org>
Cc: guile-user@gnu.org
Subject: Re: passing flags to a function
Date: Tue, 02 May 2006 12:14:58 -0400 [thread overview]
Message-ID: <1146586498.3029.32.camel@localhost.localdomain> (raw)
In-Reply-To: <44574FA0.1050108@mtl.mit.edu>
[-- Attachment #1.1: Type: text/plain, Size: 969 bytes --]
On Tue, 2006-05-02 at 08:25 -0400, Dan McMahill wrote:
> Hello,
>
> I'm sure this is a very basic question about passing "or-able" flags to
> a function. In C I might do something like:
...snip...
You can make the flags available to scheme as numbers, and then the
Scheme users can use Guile's bitwise operations (logand, longior,
logxor, etc. [see Simple Data Types -> Numbers -> Bitwise Operations in
the manual]).
> but I'm not sure of the best way to define the flags in scheme. Or
> maybe this is not "the scheme way".
This isn't really the Scheme way, but it works if you want to get
bindings done quickly. Ludovic already recommended the more schemey way,
but this isn't such a bad thing for an extension to a C program.
--
http://unknownlamer.org
AIM:unknownlamer IRC:unknown_lamer@fnode#tpu Jabber:clinton@hcoop.net
I use Free Software because I value freedom over features.
443E 4F1A E213 7C54 A306 E328 7601 A1F0 F403 574B
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2006-05-02 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-02 12:25 passing flags to a function Dan McMahill
2006-05-02 15:34 ` Ludovic Courtès
2006-05-02 16:21 ` Dan McMahill
2006-05-02 16:55 ` Ludovic Courtès
2006-05-02 16:56 ` Dan McMahill
2006-05-07 21:03 ` Marius Vollmer
2006-05-02 16:14 ` Clinton Ebadi [this message]
2006-05-03 1:43 ` Kevin Ryde
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=1146586498.3029.32.camel@localhost.localdomain \
--to=clinton@unknownlamer.org \
--cc=guile-user@gnu.org \
/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).