Category : Science and Education
Archive   : WDBDISK5.ZIP
Filename : SELECT.PAS

 
Output of file : SELECT.PAS contained in archive : WDBDISK5.ZIP
PROGRAM SELECT(INPUT, OUTPUT);
{FRED POSPESCHIL}

TYPE POINT = RECORD
CODE : INTEGER;
LATIT : INTEGER;
LONGI : INTEGER;
END;

VAR
LEVEL : INTEGER;
OUTFILE : FILE OF POINT;
INFILE : FILE OF POINT;
NEWPOINT : POINT;
INPUT_FILE : LSTRING(14);
OUTPUT_FILE : LSTRING(14);

PROCEDURE GET_POINTS;

BEGIN
ASSIGN(INFILE, INPUT_FILE);
RESET(INFILE);

WHILE NOT EOF(INFILE) DO
BEGIN
READ(INFILE, NEWPOINT);
IF NEWPOINT.CODE > LEVEL THEN
WRITE(OUTFILE, NEWPOINT);
END;

CLOSE(INFILE);
END;


BEGIN { MAIN PROGRAM }
WRITE('ENTER NAME OF FILE WHICH WILL HOLD SELECTED POINTS > ');
READLN(OUTPUT_FILE);
ASSIGN(OUTFILE, OUTPUT_FILE);
REWRITE(OUTFILE);

INPUT_FILE := 'NULL';
WHILE INPUT_FILE <> 'STOP' DO
BEGIN
WRITELN;
WRITE('ENTER FILE FROM WHICH TO SELECT POINTS OR "STOP" >');
READLN(INPUT_FILE);
IF INPUT_FILE <> 'STOP' THEN
BEGIN

WRITE('ENTER THE HIGHEST LEVEL OF DESIRED DETAIL <1 - 5> ');
READLN(LEVEL);
LEVEL := LEVEL - 1;
GET_POINTS;
END;
END;

CLOSE(OUTFILE);
END.

  3 Responses to “Category : Science and Education
Archive   : WDBDISK5.ZIP
Filename : SELECT.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/