0

In my main.adb, I with and use separate packages grids.adb and cells.adb. Grids package withs and uses cells, and works ok, visible. Cells withs and uses grids, but code in cells package doesn't see grids.

Where do I make code in grids visible by cells in this mutually dependent arrangement, which I may want to change later.

2 Answers2

0

From your description it looks like your problem is "circular unit dependency" and not a visibility problem. You may solve it if you add "limited with Grid" in your Cell package and do the same with your Grid package.

Timur Samkharadze
  • 1,737
  • 1
  • 17
  • 33
  • Thanks Timur and Frédéric. I have it working now. I did see the limited with and may try that too. Ultimately, I think I need to move some things in the two packages around. I have an array of a 2-dimensional array (rather than a single 3D array) with a cell (record) in the array of 'cells'. –  Dec 22 '17 at 17:12
0

It would be easier with some code but as stated by Timur, you could use a Limited with.

Moreover, you can read the wikibook on this topic

Frédéric Praca
  • 1,620
  • 15
  • 29
  • I cannot get limited with grids or limited with cells_test to work, anywhere. Error is "declaration expected" Are with/use statements to go in the *.ads specification file or the *.adb package body ? –  Jan 11 '18 at 00:24