Hi everyone I've been reading your board for a while and decided to become a neebie.I'm trying to learn the language so we learn by example. Can anyone tell me why this procedure does not work. I copied it off a site that was reccomended.
procedure braces;VAR x,y,x1,y1,x2,y2:REAL; ymid,xmid,temp:REAL;BEGIN
Getrect(x1,y1,x2,y2); {get the box} GetMouse(x,y); {will use this to determine which way the boxwas drawn} ymid:=(y1+y2)/2; xmid:=(x1+x2)/2; if xymid then begin {box drawn bottom to top} temp:=y1; y1:=y2; y2:=temp; end; if (abs(y2-y1)>abs(x2-x1)) then begin {box drawn taller thanwide} beginpoly; moveto(x1,y1); curveto(xmid,y1); curveto(xmid,ymid); lineto(x2,ymid); curveto(xmid,ymid); curveto(xmid,y2); lineto(x1,y2); endpoly; end else begin {box drawn wider than tall} beginpoly; moveto(x1,y1); curveto(x1,ymid); curveto(xmid,ymid); lineto(xmid,y2); curveto(xmid,ymid); curveto(x2,ymid); lineto(x2,y1); endpoly; end; redrawall;END;
run(braces);
This is what I copied,so it my be garbled.Thanks for your help.MKMAY
[ 07-06-2002: Message edited by: MKMAY ]