Lazarus
Free Pascal => Beginners => Topic started by: noob on May 14, 2014, 07:53:46 am
-
hi,
this problem puzzles me, i can't compile my program - please help.
the declaration and the mode
{$mode objfpc}{$H+}
point5: ARRAY[0..4] OF Tpoint;
i try ti assign some values to a point:
point5[0] := point(xm, ym);
andd it fails with
xygrph30\xygraph3d.pas(2086,26) Fatal: Syntax error, ")" expected but "," found
what am i doing wrong?
-
Press Ctrl and click on "point". What unit will open ?
-
struct.inc opens at:
POINT = record
x : LONG;
y : LONG;
end;
LPPOINT = ^POINT;
tagPOINT = POINT;
TPOINT = POINT;
PPOINT = ^POINT;
-
thank you for this hint. i found the problem.
if i use Windows as the first include in the USE statement the error is GONE!!
thank you very much
-
Both Windows and Classes (and also Types) unit declare Point identifier, but for different purpose. In Windows, it's a record data type. In Classes/Types, it's a function returning TPoint record. Read the docs about relationship of identifier searching and unit order in uses clause.