comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: linked list example
items: Re: linked list example

linked list example
type: item
description: Here is a set of linked list modules I made for my own use. I hesitate to post themsince they are not "bullet-proof" but they do the job. Hopefully someone will be inspired to write a better open source linked list library. My system administrator would not buy the "Fanning" book for me due to tight resources, so I had to invent my own (kluge) solutions. Cheers, Douglas J. Larson, PiledHigher&Deeper Space Radiation Lab California Institute of Technology Mail Code: 220-47 Pasadena, CA 91125 ; ************************************************************ ****************** ;+ ; Setup_llist.pro ; ; PURPOSE: ; Setup a new node of a generic linked list. ; ; CATEGORY: ; Generic linked list generator. This function is NOT an insert operator. ; ; CALLING SEQUENCE: ; somenewnode = ptr_new(Setup_llist(bugmsg)) ; ; KEYWORD PARAMETERS: ; ; COMMON BLOCKS: ; None ; ; OUTPUTS: ; Data structure ; ; MODIFICATION HISTORY: ; Created by: Douglas J. Larson, 18 August, 1998. ;- ; ************************************************************ ****************** FUNCTION Setup_llist, bugmsg if ( bugmsg eq 1 ) then message,' Entered', /INFORMATIONAL lls = { nodePtr:PTR_NEW(), $ ; Points to the linked list information next:PTR_NEW() } ; Pointer to the next data vector if ( bugmsg eq 1 ) then message,' Exited', /INFORMATIONAL RETURN, lls END ; ************************************************************ ****************** ;+ ; llist_insert.pro ; ; PURPOSE: ; Setup a new node of a generic linked list. ; ; CATEGORY: ; Generic linked list generator. This function is NOT an insert operator. ; ; CALLING SEQUENCE: ; ; KEYWORD PARAMETERS: ; ; COMMON BLOCKS: ; None ; ; OUTPUTS: ; Data structure ; ; MODIFICATION HISTORY: ; Created by: Douglas J. Larson, 18 August, 1998. ;- ; ************************************************************ ****************** FUNCTION llist_insert, bugmsg, startPtr, value if ( bugmsg eq 1 ) then message,' Entered', /INFORMATIONAL if NOT(PTR_VALID(startPtr)) then begin if ( bug…
creator: Doug Larson
date: 1998-09-02T07:00:00-00:00

Re: linked list example
type: item
description: A couple of comments: A linked list just cries out to be implemented as an object class. I wrote such a thing some time ago but will not post the code here for fear of ridicule. Robert Mallozzi (Robert.Mallozzi@msfc.nasa.gov) has written some container classes, including a last-in-first-out stack and a first-in-first-out queue. The queue is useful when reading data from text files, to avoid the performance hit when extending arrays, as discussed here a week or two ago. -- Mark Hadfield, m.hadfield@niwa.cri.nz http://www.niwa.cri.nz/~hadfield/ National Institute for Water and Atmospheric Research PO Box 14-901, Wellington, New Zealand
creator: Mark Hadfield
date: 1998-09-03T07:00:00-00:00

Re: linked list example
type: item
description: Doug Larson (djl@REMOVECAPSloki.srl.caltech.edu) writes: > My system administrator would not buy the "Fanning" book > for me due to tight resources, so I had to invent my > own (kluge) solutions. I'm sending Mr. Larson a book with my compliments for adding to the code resources of this newsgroup. It's actually the last one left of the original first edition. The updated second edition hits the streets tomorrow. Many thanks to all the generous people on this newsgroup who have bought books and offered suggestions and corrections. The next book will be coming "real soon now". :-) Cheers, David ---------------------------------------------------------- David Fanning, Ph.D. Fanning Software Consulting E-Mail: davidf@dfanning.com Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155 Coyote's Guide to IDL Programming: http://www.dfanning.com/
creator: davidf
date: 1998-09-03T07:00:00-00:00

Re: linked list example
type: item
description: In article <6sl5km$m7d$1@clam.niwa.cri.nz>, "Mark Hadfield" <m.hadfield@niwa.cri.nz> wrote: > A couple of comments: > > A linked list just cries out to be implemented as an object class. I wrote > such a thing some time ago but will not post the code here for fear of > ridicule. > actually, IDL_Container is a linked list. But it accepts only objects as its elements (last time I looked, months ago) Mirko -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
creator: mirko_vukovic
date: 1998-09-04T07:00:00-00:00

Re: linked list example
type: item
description: Mark Hadfield (m.hadfield@niwa.cri.nz) writes: > A linked list just cries out to be implemented as an object class. I wrote > such a thing some time ago but will not post the code here for fear of > ridicule. I routinely post code here when I don't have the time or energy to fix it up myself. Someone always grabs it and a day later e-mails me the "corrected" code with all those features I should have added in the first place. If I'm just searching for bugs, I announce that the program "works" or is "the best program I've ever written". I've been thinking of myself lately as more of an "idea person" rather than a "programmer". It's easier on the ego. :-) > Robert Mallozzi (Robert.Mallozzi@msfc.nasa.gov) has written some container > classes, including a last-in-first-out stack and a first-in-first-out queue. > The queue is useful when reading data from text files, to avoid the > performance hit when extending arrays, as discussed here a week or two ago. You know, even with as much free code as there is out there, I find that not too many people use it. I don't really know why. Perhaps it is just hard to read other people's code, or maybe you don't really understand it unless you write your own (my reason for writing a linked list rather than using the one Beau Legeer uses in the Advanced Programming classes). In any case, I found I had to write a book to call any attention at all to the programs I offer. Now that I think about it, maybe I should revisit the notion of program quality. :-) Cheers, David ---------------------------------------------------------- David Fanning, Ph.D. Fanning Software Consulting E-Mail: davidf@dfanning.com Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155 Coyote's Guide to IDL Programming: http://www.dfanning.com/
creator: davidf
date: 1998-09-04T07:00:00-00:00