home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!jbk@world.std.com
- From: jbk@world.std.com (Jeffrey B Kane)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Binary manipulation
- Message-ID: <199211231630.AA27869@world.std.com>
- Date: 23 Nov 92 16:30:46 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 29
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
-
-
- What is the best way to do binary manipulation of data within MCL?
- I need to do the equivalent of shifts, ands, nors, ors, etc., but the problem
- I'm having is doing these with integers and fixnums How would you convert the following
- to mcl:
-
- {
- short var1 47;
- unsigned long var2 0x322459;
-
- *((var1 & 0x7 << 3) + var2)
- }
-
- going back and forth between MCL fixnum and bit-arrays (without losing data)?
-
- Jeffrey
-
-
- ======================================
- Jeffrey Kane, MD
- Kane Biomedical Systems
- Boston, MA
-
- Internet jbk@world.std.com
- Compuserve 74206,640
- AppleLink D0738
-
- [Don't take life too seriously... it's not like anyone gets out of it alive.]
-
-