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

Home » Public Forums » archive » SPAWN + readU + strings
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: SPAWN + readU + strings [message #19872 is a reply to message #19728] Mon, 17 April 2000 00:00 Go to previous message
Ramji Digumarthi is currently offline  Ramji Digumarthi
Messages: 5
Registered: April 2000
Junior Member
thanks to the reply from David Fanning about the reading the length of
the string array.
I forgot to mention that I do get the length of the string from the
C-code, and I do read the string fine.
the problem is on the next readu of variable...
I get grabage.. IF the readU of the stirng commented out than
the variable readU works fine .

I am tryin to under stand what happens to readU with reading of the
string??? I am also enclosing the both IDl and C-code...


the C-code :::
setbuf(stdout,(char *)0);
strcpy(outStr,"Now opening the socket and waiting.\n");
strOutlen=strlen(PoutStr);
fprintf(stderr,"%i :: %d :: %s \r
",sizeof(strOutlen),strOutlen,outStr);
write(1,&strOutlen,sizeof(int));
write(1,outStr,sizeof(outStr));

read(0,&Next_data,sizeof(int));
fprintf(stderr," value read from parent : %d\r\r\n",Next_data);

strOutlen++;
write(1,&strOutlen,sizeof(int));


the IDL code :::

readu,test,strInlen
;string_in=string(replicate(32b,strInlen+1))
string_in=string(bytarr(strInlen))

readu,test,string_in,TRANSFER_COUNT=countVar
print,"Str len ::",strInlen," == ",string_in,countVar,size(string_in)

writeu,test,strInlen

readu,test,long(strInlen)
print," Test .. :",strInlen

----------------------------


any comments on why this code does not work!!!!!

thanks
ramji digumarthi
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLMs & IRIX
Next Topic: Visualization Development Environments 2000

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

Current Time: Sat Oct 11 06:10:29 PDT 2025

Total time taken to generate the page: 0.32096 seconds