Link to home
Start Free TrialLog in
Avatar of lar_jens
lar_jens

asked on

units...

I have used the menu function "Project->Add To Project" to add another unit (somename.pas). How do I access the functions of this new unit from my other units (especially the one with the form)?
Avatar of lar_jens
lar_jens

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of itamar
itamar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Unit1 can use YOURUNIT by doing like itamar said.

tip.
if Unit1 uses YOURUNIT then YOURUNIT can not use Unit1.

(it would create a cyclical dependency. neither unit can be compiled without the other one being present.)
Hi!
"if Unit1 uses YOURUNIT then YOURUNIT can not use Unit1." - This statement is only partly true.

If you need to use Unit1 in YourUnit then you should place the statement "uses Unit1;" in the implementation section of yourUnit.





Hi all!

kjteng is absolutly right!

//Viktor
hello kjteng!
yes, you are right. it actually works in delphi. i did not know. sorry.
(in turbo pascal it is not permitted that two units uses each other.)