Procedure ChriSa;
CONST
{rechtecklaenge}
rectLength = 1;
VAR
numbOfRect : INTEGER;
deltaX, p1x, p1y, p2x, p2y, rowEndPoint, distBetweenRects : REAL;
{zaehlervariablen}
i : INTEGER;
rowEndPointX,rowEndPointY : REAL;
BEGIN
numbOfRect := IntDialog('Mit wivillne Linie Zeichne? (Je meh, desto besser und unuebersichtlicher!)','88');
REPEAT
message('Klick is Faeld, det wos mit Zeichne aafange soell!');
UNTIL MouseDown(rowEndPointX,rowEndPointY);
message('rowEndPointX',rowEndPointX , 'rowEndPointY' , rowEndPointY);
distBetweenRects := (rowEndPointX - (numbOfRect* rectLength))/numbOfRect;
FOR i:= 1 TO numbOfRect DO BEGIN
deltaX := rectLength + distBetweenRects;
p1x := i * deltaX;
p1y := random * 100;
p2x := p1x + rectLength;
p2y := p1y + rectLength;
FillBack(random * 65535, random * 65535, random * 65535);
rect(p1x, p1y, p2x, p2y);
END;
{Kopiräit: Gruppe Chrisa}
END;
RUN(ChriSa);