Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-09

#26 as EOF marker?

5 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to leledumbo

The behaviour for each platform is described by the CtrlZMarksEOF
Boolean constant.

It is documented :-)

Michael.

Show quoted text 26 lines
Wed, 2 Sep 2009, leledumbo wrote: Does FPC use #26 as EOF marker? I use a loop that calls Read until it meets EOF, and right before the loop ends, #26 is met. This happens at least on Windows (other platforms untested). code: // Please redirect input from a file var c: Char; begin while not EOF do begin Read(c); Write(c); end; end. -- View this message in context: http://www.nabble.com/-26-as-EOF-marker--tp25253788p25253788.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Jonas Maebe
to leledumbo: Does FPC use #26 as EOF marker? I use a loop that calls Read until it meets EOF, and…
leledumbo wrote
Does FPC use #26 as EOF marker?

Only on platforms that traditionally use #26 as EOF marker. Afaik, these are Dos, Windows and OS/2.

I use a loop that calls Read until it meets EOF, and right before the loop ends, #26 is met. This happens at least on Windows (other platforms untested).

There is a global variable in the system unit called CtrlZMarksEOF that you can set to false if you want to disable this behaviour.

Jonas

Reply by email

Cox, Stuart TRAN:EX
to Jonas Maebe

And the grandfather of the whole line, CP/M.

Stu Cox
Project Management Technician
Southern Interior Region
Ministry of Transportation and Infrastructure
342-447 Columbia St.,
Kamloops, BC V2C 2T3
p: 250-828-4320
f: 250-828-4229

Earlier message 26 lines
-----Original Message----- From: On Behalf Of Jonas Maebe Sent: Wednesday, September 2, 2009 2:01 AM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] #26 as EOF marker? On 02 Sep 2009, at 10:44, leledumbo wrote: > Does FPC use #26 as EOF marker? Only on platforms that traditionally use #26 as EOF marker. Afaik, these are Dos, Windows and OS/2. > I use a loop that calls Read until it meets > EOF, and right before the loop ends, #26 is met. This happens at > least on > Windows (other platforms untested). There is a global variable in the system unit called CtrlZMarksEOF that you can set to false if you want to disable this behaviour. Jonas

Reply by email

Tomas Hajny
to Cox, Stuart TRAN:EX
And the grandfather of the whole line, CP/M.

Well, if we had CP/M target in FPC, sure...

Tomas

Show quoted text 33 lines
-----Original Message----- From: On Behalf Of Jonas Maebe Sent: Wednesday, September 2, 2009 2:01 AM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] #26 as EOF marker? On 02 Sep 2009, at 10:44, leledumbo wrote: > Does FPC use #26 as EOF marker? Only on platforms that traditionally use #26 as EOF marker. Afaik, these are Dos, Windows and OS/2. > I use a loop that calls Read until it meets > EOF, and right before the loop ends, #26 is met. This happens at > least on > Windows (other platforms untested). There is a global variable in the system unit called CtrlZMarksEOF that you can set to false if you want to disable this behaviour. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email