Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
hello, I have been learning/testing/playing with call external the last few days. PAssing strings, numbers, structures to and from some C routines on my sparc 10 running Sun OS . My question is this: Is it possible to pass a string by reference, and redefine it in the shared object library as a longer string? (if so, do you use the field stype and set it to 1???) I have made numerous attempts at this, but it seems that you are limitted to the size of the passed in string (from IDL) or shorter. Even when I 'realloc' (char *) s IDL dumps core, or get a bus error. (not surprising really) I guess i am asking if I have to pass in a large string that is bigger then my expected data? Also, if you reduce the size of the string, does anyone have experience of weather this will lead to large memory fragmentation. I guess as a side note, I am dreamingly hoping that some version will someday appear where IDL will allow you to type cast returned variables from routines called with call external. Anyone ever heasrd of any plans for this? (or think its a usefull or really stupid idea?) thanks for the help/insight with the string struff. -stephen -- Stephen C Strebel / SKI TO DIE strebel@sma.ch / and Swiss Meteorological Institute, Zuerich / LIVE TO TELL ABOUT IT 01 256 93 85 / (and pray for snow)