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

Home » Public Forums » archive » A complicate problem for building a map
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: A complicate problem for building a map [message #36735 is a reply to message #36690] Mon, 20 October 2003 15:49 Go to previous messageGo to previous message
condor is currently offline  condor
Messages: 35
Registered: January 2002
Member
ftls1@uaf.edu (ftls1@uaf.edu) wrote in message news:<44042ede.0310182223.d736129@posting.google.com>...

>>> I've been thinking on this topic for a couple of weeks without any
>>> idea, in C language there is a concept of 'Group', but IDL does not.
>>
>> Unfortunately my understanding of C is on the basic side, and I don't
>> think I have ever heard of a "group" in C, so I don't know what
>> functionality you are looking for. Can you describe what that is
>> supposed to do and maybe someone could tell you how to emulate this in
>> IDL.
>
> sorry, made a typo. what I said is 'Record' in Pascal Language.

Well, it's been a couple years for me since I last looked at Pascal,
but IDL certainly has a record mechanism (I think they're called
"struct"). Here's a couple trivial examples:

;; create a template:

IDL> record = {name: "" , age: 0}
IDL> help,record,/struct
** Structure <81bfda4>, 2 tags, length=16, data length=14, refs=1:
NAME STRING ''
AGE INT 0

;; create an array that holds a hundred of those:

IDL> a = replicate(record,100)
IDL> a[0].name ='fred'
IDL> a[1].name ='bob'

;; they can also be used in the usual array ways:

IDL> a[0:1].age = [35,36]

IDL> print,a[0]
{ fred 35}
IDL> print,a[1]
{ bob 36}


The tags in a struct can also be arrays, if desired, which are indexed
in the obvious way. I.e.

a[0].array[5] is the fifth element of the tag with the
name "array" in the zeroth record, while
a[5].array[0] is the zeroth element of that array in the fifth record.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: perl script to create html documentation from source files available
Next Topic: Re: Median filter the hard way

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

Current Time: Mon Oct 20 21:06:20 PDT 2025

Total time taken to generate the page: 1.68156 seconds