comp.lang.ada
 help / color / mirror / Atom feed
From: Bug <srivet@ensica.fr>
Subject: student needs help for his project
Date: 1999/01/11
Date: 1999-01-11T17:09:24+00:00	[thread overview]
Message-ID: <369A311A.156DA9A1@ensica.fr> (raw)

Hi i'd like to ask you a question.

I need to create a proggy like excel (very simplified of course)

I've got an array of cells and each cells contain infos such as -string
or expression to be evaluated

-cords of the cell in the array

-a pointer to a list of child cells (that depends on the content of the
parent one)

Ok are you following me? yep i think (sorry for the bad english but i'm
french... :)   )

I've got some packages to do this but two of them are giving me white
hair
                -the one that define the object "cell"
                -the one that define the object "list" (a list is a
chained list if the name is the same in french and in english)

Ok then, the list contains the pointers towards the child cells so in
the package list.ads, i need to refer to the package cells.ads, but as i

need list object i the definition of a cell i need to refer to the
package list.ads...it's like the snake that bit his tail...

Of course the compiler reject the thing..

SO what i wanted to know is wether i need simply to think agin my
construction or if a solution exists.

Here is part of the code :

*********************************************
with list,...;
use list,.....;

package cells is

..........

type cell is record
        content : ptr_content;           -- ptr content is a record of
two access types defined somewhere not important
        pos       : cords;                    -- line and row
        child_list : chained_list;               -- defined in the
list.ads
end record;

type ptr_cell is access cell;
..........

end cells;

*****************************************
with cells;
use cells;
package list is

....................
type ring;
type ptr_ring is access ring;
type ring is record
       information : ptr_cell;
       link : ptr_ring;
end record;
type chained_list is record
        lenght:natural;
        firts_case:ptr_ring;
end record;

.............

end list;








             reply	other threads:[~1999-01-11  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-11  0:00 Bug [this message]
1999-01-11  0:00 ` student needs help for his project David C. Hoos
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox