home *** CD-ROM | disk | FTP | other *** search
- ' GFILTER.BAS filters .GTX files within SY9280 to TQ4786
- ' sorry, but I can't give away all the data
- ' this example QBASIC program extracts places in a limited area
-
- x1! = 292 'limits of filter
- y1! = 80 'SY9280
- x2! = 547
- y2! = 186 'TQ4786
-
- INPUT "Enter input file (e.g. $E.GTX) :", infile$
-
- OPEN infile$ FOR INPUT AS #1
- OPEN "TMP.GTX" FOR OUTPUT AS #2
-
- LINE INPUT #1, tmp$ 'copy first two comment lines
- PRINT #2, tmp$
- LINE INPUT #1, tmp$
- PRINT #2, tmp$
-
- DO WHILE NOT EOF(1) 'then filter the data
- INPUT #1, cat$, xx$, yy$, n1$, n2$
- x! = VAL(xx$)
- y! = VAL(yy$)
- IF x! >= x1! AND x! <= x2! AND y! >= y1! AND y! <= y2! THEN
- PRINT #2, cat$; ","; xx$; ","; yy$; ","; n1$; ","; n2$
- END IF
- LOOP
-
- CLOSE #1
- CLOSE #2
- PRINT "All done into TMP.GTX"
-
-