student needs help for his project 
Author Message
 student needs help for his project

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;



Fri, 29 Jun 2001 03:00:00 GMT  
 student needs help for his project

<snip>

Quote:
>a list is a
>chained list if the name is the same in french and in english)

Well .. in English we usually say "linked list," but everyone should
understand you.

<snip>

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

You cannot have a circular package dependency in Ada -- although C doesn't
care about such things.
You could simply declare cell in the list package.  Then you would do a
partial declaration of type cell, and defer its fill declaration, just as
you did for the type ring.

David C. Hoos, Sr.



Fri, 29 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help Desperately Needed in Student Cobol Project

2. Student in need of final project ideas

3. Help...college student needs help w/cobol prgm.

4. How to? (student need help)

5. A student need Help with Smalltalk

6. student needs help

7. Student needs help, please

8. Desperate college students need help!!!

9. need help in xilinx student edition 2i

10. Student needs a Little Help - video problem

11. Student needs help

12. Student needs HELP!!!

 

 
Powered by phpBB® Forum Software