comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reading binary data (written using XDR) into IDL??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading Binary [message #49252 is a reply to message #4812] Wed, 12 July 2006 06:30 Go to previous messageGo to previous message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
Dirk1106@googlemail.com wrote:
> He reads it with C, but I want to work on it with IDL.
> Now I have the C-Code and he always reads 12 or 13 bits.

How does he do that in C?

It's been a while since I wrote any C and I'm more of a sysadmin these
days so I'm wary of talking Rubbish here, but I've written a fair bit in
my time and I can't recall anything in the stdio library that reads
anything less than a single byte at a time.

Furthermore, a [unsigned] char is (or was, IIRC) a single byte and the
smallest data type available in any flavour of C I've worked with, so
even if you /can/ read 12 or 13 bits you'll have to *put* it in a short
int at the very least. Although C has fairly comprehensive bitwaise
operation support at the language level, I've never seen it read or
store anything other than whole bytes.

Can you post the C fragment where he's reading 12/13 bits please?

Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: extraction of linear features from satellite imagery
Next Topic: Displaying isosurface- Hollow images

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:52:09 PDT 2025

Total time taken to generate the page: 0.79965 seconds