# re: Frustrations with Delphi for .NET 4/18/2005 6:51 AM Atul
Any ideas why we get the message "Program or Unit recursively uses itself". For sure that there is no recursion happening..:-(
# re: Frustrations with Delphi for .NET 4/18/2005 8:08 AM Bryce K. Nielsen
I find that when I get that message, it's for one of two reasons:
1. I really am recursively using the same unit, more often than not, the actual same unit. I'll be in UnitA, thinking that I'm editing UnitB trying to add UnitA to the Uses clause, and really confused when I get that error. I have to take a moment, then I realize my stoopid mistake.
2. The unit is being recursively used from another unit. I.e. UnitA uses UnitB, UnitB uses UnitC, UnitC uses UnitD, and UnitD uses UnitA. There's the recursion (A->B->C->D->A). To avoid this, put the uses in the Implementation section, not the Interface section.
-BKN
Partager