|
Re: saving a linked list to file ? (D'oh) [message #16572 is a reply to message #16563] |
Fri, 30 July 1999 00:00  |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
>> Monkeyboy Bob queried:
>> Is there a way to save the whole linked list
>> to a single file?
> David Fanning responded:
> Yep. IDL> Save, linkedlist, File='mylinkedlist.sav'
D'oh!!
This cracks me up! I nominate myself for the
prestigious 'Stupidest Question of the Year".
If I may summarize the previous posts:
Q: How do I SAVE my LINKEDLIST in a FILE called 'MYLINKEDLIST.SAV'?
A: SAVE , LINKEDLIST , FILE = 'MYLINKEDLIST.SAV'?
I think this may be the most self-answered question posted
in a long long time.
I was fooled by impressive ignorance.
I tried to look at the linked list object
(in a method called "save_database" and
self appeared to be just a structure
with 3 elements (head, tail, count).
It even had a size of
IDL> print,size(self)
0 11 1
so I was pretty sure saving that wouldn't work.
But it does, how strange and wonderful!
(I had the impression that it would be
saving "pointers to arbitrary positions")
re:
>>> (I'm beginning to think that it isn't
>>> a great idea to object-text all my info,
>>> since it seems to be really slow to display.)
> Huh!? Why do you say this?
My statement was said a bit prematurely.
As I stumble through (mostly bad) ideas on how best to
do "this", it really has been crawling along
(i.e. it would take a few seconds to get a
screen of text up, but the delays seem to be
in creating and manipulating objects. Saving
them all, and reading and keeping it all in memory
will solve that problem)
Thanks for the info!
cheers,
bob
PS David, when is the "object oriented programming in IDL" book
going to be finished?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
|
|
|