Re: need help with spawn and readf [message #19767] |
Fri, 14 April 2000 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
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.
Cheers,
David
--
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
|
|
|