in reply to Help with ADT

It seems to me that you are storing things in a reference to an array:
[ ['measurement1', [ ['test subject number', 21, 27], ['value', 50], ... ], ... ], ... ]

But you are trying to get at the data as if it is a reference to a hash:

$info->{subdirectory}->{file}->[measurement] = INDEX; $info->{subdirectory}->{file} = PARSER; $info->[measurement]->{name} = NAME;

But it is hard to tell given the examples you actually gave. Is $info a reference to an array or to a hash?

Also, you might find your code more readable if you only dereference where you need to do so. For instance, instead of $info->{subdirectory}->{file} try just $info->{subdirectory}{file}.

By the way, an "ADT" usually means an "Abstract Data Type" not an "Advanced Data Type." One person's advanced data type is another's basic data type.

I'd be happy to help if you provide a little more information.

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: Help with ADT
by dimmesdale (Friar) on Jul 24, 2002 at 20:34 UTC
    Thank you ... don't worry too much over what I have. They were just notes basically, as what I have in my code *has* to change (I knew that basically when I was putting the code in -- I just thought that it might work :)

    I think that the class::Struct is perfect for what I want -- the documentation sure got me exited so far anyway. I'll update this with more information if it doesn't work ... and thank's for all the help.

    Now, as for the "ADT" part ... thanks. One of my classes sometime ago had a book (something like Data Types with C++, or ADTs, or something to that effect). Well, it talked about (beat into the ground) all about ADTs -- it's a shame that I remembered it incorrectly. Yes, I recall now that it is "Abstract"...that reminds me-- Data Abstraction with C++. Decent book, by the way.