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

need help with spawn and readf



Hi folks,
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?

thanks
ramji digumarthi
ramji.digumarthi@lmco.com
650-354-5661