1 {//-------------------------------------------------------------------------}
3 {Copyright (C) 1990, 2009 - Apogee Software, Ltd. }
5 {This file is part of Supernova. Supernova is free software; you can }
6 {redistribute it and/or modify it under the terms of the GNU General Public }
7 {License as published by the Free Software Foundation; either version 2 }
8 {of the License, or (at your option) any later version. }
10 {This program is distributed in the hope that it will be useful, }
11 {but WITHOUT ANY WARRANTY; without even the implied warranty of }
12 {MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. }
14 {See the GNU General Public License for more details. }
16 {You should have received a copy of the GNU General Public License }
17 {along with this program; if not, write to the Free Software }
18 {Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.}
20 {Original Source: 1990 Scott Miller }
21 {Prepared for public release: 03/19/09 - Joe Siegler, Apogee Software, Ltd. }
23 {//-------------------------------------------------------------------------}
27 {This program WRITES and READS from the text file:
28 'Line', 80 letters (Max),
29 {This program has the line edit feature!}
34 DescriptionLength = string[Max];
38 Line : file of descriptionlength;
39 Position,Counter,Start,Stop : integer;
40 Text : descriptionlength;
45 procedure Diskwrite(text: Descriptionlength; pointer: integer);
49 writeln('line responce ',pointer,
50 ' is written! Size = ',filesize(Line));
52 end; {End of Diskwrite.}
54 procedure Diskread(start,stop: integer);
57 text : descriptionlength;
62 for counter:= start to stop do
67 writeln(lst,counter,text)
70 writeln('Here is line responce # ',counter);
77 write('The file contains ',filesize(Line),' line responces.');
78 end; {End of Diskread.}
82 if (length(text)=70) then write(^g);
90 writeln('Do you want to R)ead or W)rite?');
92 if upcase(answer) <> 'R' then {Write to 'line' files.}
96 writeln('Now RESETing line files.');
99 writeln('Input a string not more than ',Max,' characters.',
100 ' ''\''-Ends string.');
107 delete(text,length(text),2);
110 if (letter <> '\') and (letter <> ^h) then text:=text+letter
111 until (length(text)=Max) or (letter='\');
116 writeln('Total of ',length(text),' characters.');
122 writeln('Now WRITING string to disk.');
123 writeln(' At what position? (Next open is # ',filesize(Line),')');
125 Diskwrite(text,position);
127 else {Read from 'Rooms'.}
130 writeln('To the S)creen or P)rinter?');
132 if(upcase(answer)='P')then List:=True else List:=False;
135 writeln('Filesize = ',filesize(Line),
136 ' (From 0 to ',filesize(Line)-1,')');
138 writeln('Enter starting position:');
140 if(start > filesize(line)-7)then stop:=(filesize(line)-1) else
142 writeln('Enter final position:');
145 Diskread(start,stop);
146 end; {End of else clause.}
147 writeln;writeln('Another line responce? Y)es or N)o');
149 until upcase(answer) = 'N'; {End of Main loop.}
150 writeln; writeln(^g,'You are now out of the program.')