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

Home » Public Forums » archive » Structure Pass By Reference?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Structure Pass By Reference? [message #32882] Fri, 15 November 2002 15:46
nrk5 is currently offline  nrk5
Messages: 7
Registered: December 2000
Junior Member
Hi,

I have a very deep structure that looks something like this:

struct = $
{vmap, $
a: ptr_new(), $
b: ptr_new()$
}

struct = $
{rindex, $
x: 0, $
y: 0 $
}

where vmap.a is an array of structures of type RINDEX. vmap is an
actual defined object and rindex is just a structure

in a vmap method i need to access individual elements of a. i tried
(for example):

rindex1 = (*self.a)[2]
rindex1.x = 2

I would think that since (*self.a)[2] is a structure of type rindex,
it would be passed by reference and therefore rindex1.x = 2 would mean
(self.a)[2].x =2, but this is not the case. Can somebody help me out?

Thanks

Nidhi
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fore/background colors of labels
Next Topic: calling a function in herself

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

Current Time: Fri Oct 10 20:27:14 PDT 2025

Total time taken to generate the page: 1.36688 seconds