[Lazarus] read single char from STDIN

2011-11-18 Thread Martin
Not done any console apps in a long time. If I do: var c: char; read(c); It will read individual files, but only after I pressed enter on my terminal. What is needed to read the char immediately? -- ___ Lazarus mailing list Lazarus@lists.lazarus.f

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Henry Vermaak
On 18/11/11 13:06, Martin wrote: Not done any console apps in a long time. If I do: var c: char; read(c); It will read individual files, but only after I pressed enter on my terminal. What is needed to read the char immediately? This is rather platform specific, since you have to set your term

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Chris Kirkpatrick
On 18/11/11 13:06, Martin wrote: Not done any console apps in a long time. If I do: var c: char; read(c); It will read individual files, but only after I pressed enter on my terminal. What is needed to read the char immediately? -- ___ Lazarus ma

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Sven Barth
Am 18.11.2011 17:18, schrieb Chris Kirkpatrick: On 18/11/11 13:06, Martin wrote: Not done any console apps in a long time. If I do: var c: char; read(c); It will read individual files, but only after I pressed enter on my terminal. What is needed to read the char immediately? -- _

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Henry Vermaak
On 18/11/11 16:18, Chris Kirkpatrick wrote: It really needs get(c) but this function, together with put(c), which were defined in Jensen & Wirth and all standard Pascals, has long been missing from Turbo Pascal, and all its deriviatives such as Freepascal. How does get(c) differ from read(c)?

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread William Oliveira Ferreira
i´ve always used c := ReadKey; William de Oliveira Ferreira Bacharel em Sistemas de Informação 2011/11/18 Henry Vermaak > On 18/11/11 16:18, Chris Kirkpatrick wrote: > >> It really needs get(c) but this function, together with put(c), which >> were defined in Je

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Martin
On 18/11/2011 16:38, Henry Vermaak wrote: On 18/11/11 16:18, Chris Kirkpatrick wrote: It really needs get(c) but this function, together with put(c), which were defined in Jensen & Wirth and all standard Pascals, has long been missing from Turbo Pascal, and all its deriviatives such as Freepasca

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread Chris Kelling
On Fri, Nov 18, 2011 at 11:48 AM, William Oliveira Ferreira wrote: i´ve always used c := ReadKey; William de Oliveira Ferreira Bacharel em Sistemas de Informação to expand on that, use the boolean function keypressed. Remember on IBM compatibles that function

Re: [Lazarus] read single char from STDIN

2011-11-18 Thread leledumbo
Try the example here: http://www.freepascal.org/docs-html/rtl/keyboard/getkeyevent.html -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-read-single-char-from-STDIN-tp3518536p3520501.html Sent from the Free Pascal - Lazarus mailing list archive at

Re: [Lazarus] read single char from STDIN

2011-11-19 Thread Mark Morgan Lloyd
Henry Vermaak wrote: On 18/11/11 13:06, Martin wrote: Not done any console apps in a long time. If I do: var c: char; read(c); It will read individual files, but only after I pressed enter on my terminal. What is needed to read the char immediately? This is rather platform specific, since you