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

Home » Public Forums » archive » Re: Naive pointer question ?
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: Naive pointer question ? [message #28942 is a reply to message #28938] Tue, 22 January 2002 14:34 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
trouble wrote:

> From my understanding, pointers are useful in C where you have the
> option of passing by value or by reference, but in IDL it seems one

That's one use of pointers. Another, more important one, is in data
structures. A single piece of data can be referred to in two or more
different structures by have a pointer to that data stored in each
structure. In languages without pointers, you can often achieve similar
effects by storing an array index instead of a pointer. However, code
that uses this index needs to know both the array name in order to use
the index to retrieve the value it refers to. That's far clumsier than
the equivalent pointer code.

For instance, try implementing a linked list without pointers (or
equivalent constructs), and then compare the resulting code to the
equivalent code in C. Of course, to appreciate how much simpler the C
code is, you have to be fairly familiar with C, otherwise it will just
look like gibberish.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: runtime-license
Next Topic: bug in curvefit?

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

Current Time: Fri Oct 10 22:01:32 PDT 2025

Total time taken to generate the page: 0.47827 seconds