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

Home » Public Forums » archive » readu/writeu oddity in xdr files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
readu/writeu oddity in xdr files [message #7180] Mon, 07 October 1996 00:00 Go to next message
Kile_Baker is currently offline  Kile_Baker
Messages: 5
Registered: March 1994
Junior Member
I'm not sure my original post ever got out to the network, since I've
seen no followup from anybody. So I will repost it. If you've seen
this already, my apologies.

I was sent the following program to read an XDR file.

function read_file,filename

openr,unit,/get_lun,filename,/xdr

time=''
filter=''
m=0
n=0
writeu,unit,time
writeu,unit,filter
writeu,unit,m,n
image=fltarr(m,n)
writeu,unit,image
close,unit
return,image
end

OK, the file was opened for READING, but from then on the program used
WRITEU statements, not READU. However, the program produced no errors,
and the really weird thing is that it actually does read the data from the
file and returns the desired image to the calling program.

This was done on an HP UNIX system. Does anyone know if the same
thing would happen on other systems? Is there some reason why it
is supposed to work this way?

By the way, this only works with files that have been opened with the
XDR keyword.

--
Kile Baker (kile_baker@jhuapl.edu) | All opinions are my own and
Johns Hopkins Applied Phys. Lab | not those of the JHU/APL
Re: readu/writeu oddity in xdr files [message #7237 is a reply to message #7180] Mon, 14 October 1996 00:00 Go to previous message
Tim Patterson is currently offline  Tim Patterson
Messages: 65
Registered: October 1995
Member
David Fanning wrote:

>
> You have mistakenly gotten ahold of a beta version of IDL 5.0.
> This completely unpublicized feature will completely revolutionize
> IDL programming. No more do you have to actually type what you
> want IDL to do. In this version, IDL can *read your mind* and do
> what you *thought* you were typing!

I've heard PV Wave 7.0 goes one better though. Instead
of reading your mind and doing what you thought you were
doing, it actually reads your boss's mind and does what
you _really_ should have been doing!


Tim
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: adding a colorbar legend to a contour plot?
Next Topic: problem with 16bit color with IDL

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

Current Time: Wed Oct 08 18:39:21 PDT 2025

Total time taken to generate the page: 0.00622 seconds