=?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= expounded in news:op.vcig7go1ule2fv@garhos: > Le Mon, 10 May 2010 22:56:11 +0200, Maciej Sobczak > a écrit: >> Coming back to I/O - what I miss in Ada is the equivalent of fread in >> C - that is, an operation that reads *up to* the given number of >> bytes. Or maybe there is something that I didn't notice? > It's there : look at [ARM 2005 13.13.1] which defines the package > Ada.Streams, which in turn contains the following : > > type Root_Stream_Type is abstract tagged limited private; > ... > type Stream_Element is mod implementation-defined; > ... ... > Well, to be honest, this is not exactly the same as with C, as > Ada.Streams.Stream_Element is implementation defined (which is good, > because this is indeed platform dependent), so you will need .. All this is well and good for applications that can work in "implementation defined" units of type Stream_Element. A pragma won't fix the problem should it be different than a byte. Granted, it will never likely come up on the platforms I have in mind. But I do believe a POSIX friendly version of this should exist. Then the entire issue goes away. Under the hood, if the types work out the to the same size as a byte, you can capitalize on that in an implementation dependendant way. Anything that makes Ada more posix friendly, helps its general acceptance. Warren