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

Home » Public Forums » archive » dlm returning ptr array and string array
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: dlm returning ptr array and string array [message #34359 is a reply to message #34280] Mon, 03 March 2003 14:34 Go to previous messageGo to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
On Mon, 3 Mar 2003, Reimar Bauer wrote:

>>> Now my questions:
>>> Is it possible to return a pointer vector by a dlm?
>>
>> I am not entirely sure I understand what you are asking here. You cannot
>> create an IDL pointer in C, so if that is what you are asking you'll need
>> to rethink things. You can, create and return IDL variables and arrays of
>> any type (other than pointers). Likewise with structures but you cannot
>> directly interface these as objects (unless, of course, Ronn has some new
>> tricks to show us)
>
> I found an article from Nigel Wade by searching google so I think it is
> possible or ?
> .http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&a mp;threadm=aoehm9%247pf6%241%40rook.le.ac.uk&rnum=9& prev=/groups%3Fq%3Ddlm%2B%252Bpointer%26hl%3Dde%26lr%3D%26ie %3DUTF-8%26selm%3Daoehm9%25247pf6%25241%2540rook.le.ac.uk%26 rnum%3D9

Yes, if all you want to do is return a C pointer, then what Nigel suggests
is absolutely fine. In my dlms for postgresql rather than return the
pointer directly cast as a long, I build a table of simple connection or
result indicies that keeps track of the C pointers. In this way, I can
return a simple index number rather that I can subsequently use to
'lookup' the pointers in C (much like the IDL/Fortran LUNs work). I did
this after a few people using my code commented that the bizarre unsigned
long integers that represented my C pointers must signify an error has
occurred. What you cannot do is directly create an IDL pointer in C (i.e.
IDL> a = ptr_new(...)).

If you are going to write your own data format, you may want to use the
XDF or CDF network formats as these are cross-platform for posix machines.

Cheers,
Randall
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: current directory
Next Topic: MPEG4 in IDL

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

Current Time: Wed Oct 08 19:30:06 PDT 2025

Total time taken to generate the page: 0.00472 seconds