[net.lang.ada] Pascal vs. C

friesen@psivax.UUCP (Stanley Friesen) (01/25/85)

In article <1709@sdcrdcf.UUCP> markb@sdcrdcf.UUCP (Mark Biggar) writes:
>In article <268@psivax.UUCP> friesen@psivax.UUCP (Stanley friesen) writes:
>>	How does it do with the following problem.  Write a
>>*general purpose* fixed length record file I/O subroutine package,
>>which reads each record directly into the application's data
>>structure. Each application must be able to perform I/O on *any*
>>record structure desired simply by calling the appropriate
>>routine with a reference to the data structure as an argument.
>>The problem I see with implementing this in Pascal or Ada
>>is that the I/O routines *cannot* know what type the argument
>>is going to be since it can be *any* legal record or array type.
>
>This problem need to be specified a little more clearly, but as there are
>only clearification involves only 2 solutions I will give both.
>
>1)  If the user intends to only have one data type stored in each file.
>	then the problem is already solved by the standard packages
>	SEQUENTIAL_IO and DIRECT_IO specified in the Ada* LRM.
>	In this case the routines DO know the type of the argument.
>	These generic packages nedd to be instantiated use the
>	datatype as an argument before they can be used in a program.
>

	I meant version #1.  Actually what I wanted to know was
can you *write* the SEQUENTIAL_IO package and DIRECT_IO package
*in* Ada, and how would you do it? How would you declare the
dummy arguments in the routines?
	BTW, what is meant by "instantiate to use the data type"?
-- 

				Sarima (Stanley Friesen)

{trwrb|allegra|burdvax|cbosgd|hplabs|ihnp4|sdcsvax}!sdcrdcf!psivax!friesen

jans@mako.UUCP (Jan Steinman) (01/29/85)

[Sorry for burdening the net with this, but our Postmaster couldn't seem to
 find this person.  This is an answer to a reply to one of my net postings
 which, come to think of it, may be of general interest.]
 
: From: jans@mako (Jan Steinman)
: To: usc-ecl.arpa:blarson%ecld@tektronix!uw-beaver!
: Subject: Re: Pascal vs. C
: 
: > I was going to send a flame, but forest fires don't fit over the net well.
: > Ada is one of the two worst languages I have ever seen.
: 
: You forgot to add, "in my opinion".  Perhaps you can explain your opinion
: better?  Have you actually used the language, or is your opinion based on
: "seeing" it?  (whatever that is)
: 
: I don't claim Ada is an end-all, and I'll certainly admit it has some
: problems, but I still feel it fills a need.  And regardless of what you or I
: think, it will be used and will be a major force in computing.  Whether one
: likes it or not, there are gobs of money in it for those who bother to learn
: and use it, instead of simply "flame throwing".
: 
: > Care to guess what the other is?
: 
: No, not really.
: 
-- 
:::::: Jan Steinman		Box 1000, MS 61-161	(w)503/685-2843 ::::::
:::::: tektronix!tekecs!jans	Wilsonville, OR 97070	(h)503/657-7703 ::::::

jbn@wdl1.UUCP (01/30/85)

     ``Object-based methodology'' with respect to Ada?  Ada is a good old
Von Neumann procedural language, despite elaborate declarations.