TIP: Click on subject to list as thread! ANSI
echo: pascal
to: ALL
from: RICKEY PARRISH
date: 1998-04-18 19:22:00
subject: question about arrays

Hello All!
        I just installed Turbo Pascal 7.0 about 2 hours ago, and am now 
trying to write a file viewing program for my BBS.  What I want to do, is 
open a file and create an array with all the stuff in the file.  Hard to put 
it into words,so heres the code (its crappy, so it'll probably be just as 
hard to understand )
--
program FileView;
uses crt;
var lines: array[1..252] of string[80];
    f:text;
    i,j:integer;
begin
     i:=0;
     j:=0;
     assign(f,'\shotgun\help\shotgun.doc');
     reset(f);
{
     while not Eof(f) do
Id like to be able to do it that way, but gotta use the next line for now
}
     while i < 252 do
     begin
          i:=i+1;
          j:=j+1;
          readln(f,lines[i]);
     end;
     close(f);
     i:=0;
     while i < j do
     begin
          i:=i+1;
          writeln(lines[i]);
     end;
end.
--
        Anyway, because its the largest text file I got, Im opening the help 
file for the shotgun BBS.  Its just shy of 10,000 lines.  Just to see how 
much of that I could read, I set the array line to "lines[1..10000]" but it 
said "Error 22: Structure too large.".  It didnt work for me until I shrunk 
it down to the 252 that its at now (which works perfectly ).  So I guess 
my question is, how do I tell it to make my array larger?  One of the files 
I'd like to be able to let callers view and search through is the fidonet 
nodelist,which I dont have on hand right now, but im sure there are more than 
252 echos listed in it :)
        (BTW - I know that this will not work for a remote user on my BBS.  
Once I get the array and other crap worked out I will find a door kit and use 
that)
        Thanks for any help you can give.  TTYL
--- Maximus/2 2.02
---------------
* Origin: T-Shirts 'N Genes BBS Duncan Canada (250) 748-3408 (1:340/204)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.