[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need help with spawn and readf

Ramji Digumarthi (ramji.digumarthi@lmco.com) writes:

> I am looking for some examples of using spawn and readf with IDL and C.
> I am currently using IDL 5.0 and 5.1 versions. I can read and write
> using binary readu(IDL) and write(C).
> I would like to use readf(IDL) and fprinf(C).
> I spawn a child process and in the child process.
> IDL code: 
> spawn,program, unit=prg
> readf,unit=prg,long(int_var)
> print,int_var
> C code:
> int int_var;
> fprintf(stdout,"%d",int_var)
> this does not work and the IDL program hangs...
> if modify the C-code  fprintf to fprintf(stdout,"%d\n",int_var) 
> then I get 
> READF : input conversion error
> any comments or any examples?

Just one comment: Ain't gonna happen. :-)

The pipe is unformatted binary only.


David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155