Using parameter as array index

I'm writing a program that splits files into sections (useful if you've
got >1.4Mb files you want to fit on a floppy) and I want the user to be
able to enter the no. of bytes each "split" should contain and pass this
information to the actual splitter procedure. I want to use this to
declare an array and use BlockRead and BlockWrite. Here's the code as it
is now:

PROCEDURE split_once(VAR
infile,outfile:files;fname:STRING;splitnum:splits;bytes:longint);
VAR
   snum:STRING[3];
   buf:byte; {this should be something like buf:ARRAY[1..bytes] OF
byte;}
   i:Integer;
BEGIN
     str(splitnum,snum);
     IF splitnum<100 THEN
        snum:='0'+snum;
     IF splitnum<10 THEN
        snum:='0'+snum;
     fname:=fname+'.'+snum;
     write('Processing ',fname,'... ');
     assign(outfile,fname);
     rewrite(outfile);
     error:=ioresult;
     IF error<>0 THEN
     BEGIN
          writeln(#7+'ERROR! The output file '+fname+' could not be
created!');
          writeln('Possible causes might be a corrupted disk, a hidden
or read-only file');
          writeln('with that name that already exists, or directory/file
access denied.');
          writeln('Check these possibilities and try again.');
          writeln;
          close(infile);
          error:=ioresult;
          halt(1);
     END;
     FOR i:=1 TO bytes DO {I don't want to have to use a loop}
     BEGIN
          read(infile,buf); {here I want to use BlockRead to read the
entire load of bytes at one}
          error:=ioresult;
          IF error<>0 THEN
          BEGIN
               read_error(fname); {other procedure in program}
               shutdown(infile,outfile); {other procedure; closes files
and does Halt(1)}
          END;
          write(outfile,buf); {I want to use BlockWrite here}
          error:=ioresult;
          IF error<>0 THEN
          BEGIN
               write_error(fname); {other procedure in program}
               shutdown(infile,outfile);
          END;
     END;
     close(outfile);
     error:=ioresult;
     writeln('[Done!]');
END;

Thanxs in advance; I hope I haven't lost anyone with the complex
explanation :(

--
God's final message to His creation: "We apologize for the
inconvenience"
Devlin Wright, URL: http://www.geocities.com/SiliconValley/Lakes/7568/