comp.lang.ada
 help / color / mirror / Atom feed
From: HYUNG@SCU.BITNET (Defender of The Faith)
Subject: a simple Sequential_IO question
Date: 13 Feb 88 22:08:00 GMT	[thread overview]
Message-ID: <8802132209.AA06276@jade.berkeley.edu> (raw)

Hello Netlanders:

        I personally know very little about Ada.  I am sending this on
behalf of a professor who is having problems with VAX Ada.  He is trying
to do simple sequential I/O in his program.

----------------------------------------------------------------------
with Sequential_Io;
use Sequential_Io;

procedure file_test is
        infyle, outfyle: file_type;
        var : integer;
begin
        open(infyle, in_file,"input.fil");
        create(outfyle,out_file,"output.fil");
        while not end_of_file(infyle) loop
                read(infyle,var);
                write(outfyle,var);
        end loop;
        close(outfyle);
        close(infyle);
end file_test;

----------------------------------------------------------------------

When I include "use sequential_io", the compiler keeps on telling me
that "sequential_io" is not a generic package.  The professor claims
that the above program works with an Ada compiler on the PC.

I tried to instantiate the package with:

        package s_io is new sequential(integer);
        use s_io;

But that still won't work.  Will some of you Ada gurus out there
help me with this rather simple question?  A sample program with
"sequential_io" would be of great help.

Thanks in advance for any help

P.S. We are running VMS 4.5 on a VAX 8650.

===========================================================================
Henry Yung               BITNET: hyung@scu
Operations Assistant     ARPA:   hyung%scu.bitnet@jade.berkeley.edu
Academic Computer Center USENET: portal!cup.portal.com!henry_k_yung@sun.com
Santa Clara University   INET:   henry_k_yung@cup.portal.com
Tel: (408)554-4082
===========================================================================

                 reply	other threads:[~1988-02-13 22:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox