home *** CD-ROM | disk | FTP | other *** search
File List | 1987-08-30 | 478 b | 26 lines |
- 0010 // Listing 1
- 0020
- 0030 // TRAP HANDLER RETRY ENDTRAP - DEMO
- 0040
- 0050 USE graphics
- 0060 graphicscreen(0)
- 0070
- 0080 xmin:=-10; xmax:=10; dx:=(xmax-xmin)/640
- 0090 window(xmin,xmax,-10,10)
- 0100 moveto(xmin,f(xmin))
- 0110 x:=xmin
- 0120 REPEAT
- 0130 TRAP
- 0140 x:+dx
- 0150 drawto(x,f(x))
- 0160 HANDLER
- 0170 RETRY
- 0180 ENDTRAP
- 0190 UNTIL x=xmax
- 0200
- 0210 END "Das war's"
- 0220
- 0230 FUNC f(x)
- 0240 RETURN (2*x-3)/(x*x-1)
- 0250 ENDFUNC f
-