comp.lang.ada
 help / color / mirror / Atom feed
* Re: Pascal vs. C
       [not found]         ` <6283@boring.UUCP>
@ 1985-01-25 16:29           ` Stanley Friesen
  0 siblings, 0 replies; only message in thread
From: Stanley Friesen @ 1985-01-25 16:29 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1985-01-25 16:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4859@utzoo.UUCP>
     [not found] ` <11@mit-athena.ARPA>
     [not found]   ` <177@gcc-opus.ARPA>
     [not found]     ` <7055@brl-tgr.ARPA>
     [not found]       ` <25@seismo.UUCP>
     [not found]         ` <6283@boring.UUCP>
1985-01-25 16:29           ` Pascal vs. C Stanley Friesen

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