Q&A

  • Point -> Missing operator or semicolon
다음의 error [ Missing operator or semicolon ] 좀 도와 주세요??

procedure ImageRegionMouseMove(var Image: TImage; Point: TPoint);
var
  Pt1: TPoint;
  Pt2: TPoint;
begin
  pt1.x := Point.x;
  pt1.y := Point.y;
  pt2:= Point(x,y);  <-- {error}
end;
2  COMMENTS
  • Profile
    윤수아 2005.05.18 01:38
    에러 1
    Pont(x,y) 함수 이름과 인자로 받은 TPoint타입의 Point 변수 이름이 같음..
    TPoint 타입의 변수 이름을 다른 것으로 고치세요.. 현재는 Point라고 하면..변수가 지칭되거든요...

    에러 2
    procedure ImageRegionMouseMove(var Image: TImage; APoint: TPoint);
    var
      Pt1: TPoint;
      Pt2: TPoint;
    begin
      pt1.x := APoint.x;
      pt1.y := APoint.y;
      pt2:= Point(x,y);  <-- {error}
    end;
    이렇게 고치고나면 x랑 y가 뭐냐고 에러가 남.. 뜬금없는 x,y는 뭔가요??? 전역변수인가요?
    전역으로 선언하셨다면 에러 안 날테니까...상관없고요.... 선언 안해주신 변수라면...
    선언을 하시던지 하세요

  • Profile
    양소영 2005.05.18 02:03
    -