[plt-scheme] bytes, chars, mzchars

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Jan 10 08:52:49 EST 2008

At Thu, 10 Jan 2008 08:42:20 -0500, tom sgouros wrote:
> 
> Matthew Flatt <mflatt at cs.utah.edu> wrote:
> > 
> > > For this application, I have a function that would like to receive a
> > > single (8-bit) char value.
> > 
> > I'd use an exact integer in [0,255] for that, which corresponds to the
> > `byte?' predicate in Scheme.
> 
> In the C code, then, you'd use SCHEME_INT_VAL() and just check that it's
> in [0,255]?

Yes, SCHEME_INTP() and SCHEME_INT_VAL() in [0,255].

Matthew



Posted on the users mailing list.