[fpc-devel] Console IO revisited

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Fri Dec 3 16:26:16 CET 2010


Thaddy wrote:
> On 3-12-2010 13:52, Michael Van Canneyt wrote:
>>
>> As said in my other mail:
>> The behaviour of Input, Output, StdErr is not governed by OS rules, 
>> but by the pascal standard.
>>
>> Michael.
> 
> My understanding has always been that the PASCAL syntax allowed for 
> console IO in a way that encapsulates the console IO features that an OS 
> supports.

My understanding is that you are wrong.

"For those program parameters that are file variables, the binding is 
implementation defined." [J&W, 3rd edition, p200].

"The effect of applying the predeclared procedure Reset or Rewrite to 
either Input or Output is implementation-defined." [ibid, p129].

Note further that J&W does not make provision for binding a file 
variable to a named file or device, or for a non-blocking keyboard read.

Every description of "classical" Pascal that I have seen makes it 
abundantly clear that Wirth considered that the mapping between 
INPUT/OUTPUT and whatever physical or logical devices were available was 
outside his remit. I'd particularly point out that J&W entertains the 
possibility that they could be mapped to tapes, card readers or any of 
the other weird and wonderful I/O devices available when the language 
was defined.

So, FPC might attempt to encapsulate the file handling capabilities of 
current OSes, which are very different from what were available when 
Wirth designed Pascal. However at that point I'd suggest that you listen 
attentively to what FPC's developers tell you, rather than expecting 
them to listen attentively to you.

Written as an exasperated non-developer,

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list