From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Clinton Ebadi Newsgroups: gmane.lisp.guile.user Subject: Re: passing flags to a function Date: Tue, 02 May 2006 12:14:58 -0400 Message-ID: <1146586498.3029.32.camel@localhost.localdomain> References: <44574FA0.1050108@mtl.mit.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0523462868==" X-Trace: sea.gmane.org 1146586558 15770 80.91.229.2 (2 May 2006 16:15:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 May 2006 16:15:58 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue May 02 18:15:52 2006 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FaxXM-0006mE-AJ for guile-user@m.gmane.org; Tue, 02 May 2006 18:15:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaxXL-0006bo-On for guile-user@m.gmane.org; Tue, 02 May 2006 12:15:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FaxWl-0006GR-FW for guile-user@gnu.org; Tue, 02 May 2006 12:15:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FaxWj-0006ED-Po for guile-user@gnu.org; Tue, 02 May 2006 12:15:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FaxWj-0006E3-Lt for guile-user@gnu.org; Tue, 02 May 2006 12:15:05 -0400 Original-Received: from [204.127.200.84] (helo=sccrmhc14.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FaxWv-0002dy-DT for guile-user@gnu.org; Tue, 02 May 2006 12:15:17 -0400 Original-Received: from localhost.localdomain (c-68-49-172-183.hsd1.md.comcast.net[68.49.172.183]) by comcast.net (sccrmhc14) with ESMTP id <20060502161459014001tmeje>; Tue, 2 May 2006 16:15:04 +0000 Original-Received: by localhost.localdomain (Postfix, from userid 1000) id F375B3C18569; Tue, 2 May 2006 12:14:58 -0400 (EDT) Original-To: Dan McMahill In-Reply-To: <44574FA0.1050108@mtl.mit.edu> X-Mailer: Evolution 2.4.2.1 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:5273 Archived-At: --===============0523462868== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-p37o5EH9eiF1yDwoQDFI" --=-p37o5EH9eiF1yDwoQDFI Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2006-05-02 at 08:25 -0400, Dan McMahill wrote: > Hello, >=20 > I'm sure this is a very basic question about passing "or-able" flags to=20 > 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=20 > 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. --=20 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 --=-p37o5EH9eiF1yDwoQDFI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBEV4WCdgGh8PQDV0sRAnEzAKCEgGqOktr5PaO7Krcnxsh4ZM7JZQCeK3Vt jxLcnpq2RJDQTJtmcTDb2l8= =xpDx -----END PGP SIGNATURE----- --=-p37o5EH9eiF1yDwoQDFI-- --===============0523462868== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --===============0523462868==--