Q&A

  • 다른 unit의 공통함수 사용법
안녕하세요..

unit1에서 unit2의 함수를 사용하려고 하면 어떻게 해야 하나요?

예) showmessage(inttostr(f_add(1,2));

unit1의 uses에 unit2를 추가하고

unit1에서 f_add 함수를 call하면 에러가 납니다.

선언이 안
1  COMMENTS
  • Profile
    이경문 2001.12.05 20:41
    interface 부분에 function의 prototype을 넣으세요.

    uses하면 implementation은 참조하지 않고 interface 부분만 참조합니다.



    눈부신나 wrote:

    > 안녕하세요..

    > unit1에서 unit2의 함수를 사용하려고 하면 어떻게 해야 하나요?

    > 예) showmessage(inttostr(f_add(1,2));

    > unit1의 uses에 unit2를 추가하고

    > unit1에서 f_add 함수를 call하면 에러가 납니다.

    > 선언이 안