Sign in Join

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

Mailing lists / fpc-pascal / 2003-06

System unit and readln

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Maciej Łaszcz

Hello,

Where can I find the declaration of read, readln, write and writeln procedures? I've searched the whole source package for fpc and didn't find even header of those function, where they are?

Reply by email

Peter Vreman
to Maciej Łaszcz
Show quoted text 5 lines
Hello, Where can I find the declaration of read, readln, write and writeln procedures? I've searched the whole source package for fpc and didn't find even header of those function, where they are?

They are handled internally by the compiler. See the reference manual for a description

Reply by email

Marco van de Voort
to Maciej Łaszcz: Where can I find the declaration of read, readln, write and writeln procedures? I've…
Where can I find the declaration of read, readln, write and writeln procedures? I've searched the whole source package for fpc and didn't find even header of those function, where they are?

These aren't proper procedures, and the compiler generates "special" code for it.

So there is no definition.

If you are merely searching for a way to do variable number of arguments, look in the help for "array of const"

Reply by email

Maciej Łaszcz
to Marco van de Voort
Marco van de Voort wrote 11 lines
> Where can I find the declaration of read, readln, write and writeln > procedures? I've searched the whole source package for fpc and didn't > find even header of those function, where they are? These aren't proper procedures, and the compiler generates "special" code for it. So there is no definition. If you are merely searching for a way to do variable number of arguments, look in the help for "array of const"

I need to know which system function have to be blocked to block writeln, write function. And as I see I can't block it

Reply by email

Marco van de Voort
to Maciej Łaszcz
Show quoted text 15 lines
On Thu, 19 Jun 2003, Marco van de Voort wrote: > > Where can I find the declaration of read, readln, write and writeln > > procedures? I've searched the whole source package for fpc and didn't > > find even header of those function, where they are? > > These aren't proper procedures, and the compiler generates "special" code > for it. > > So there is no definition. > > If you are merely searching for a way to do variable number of arguments, > look in the help for "array of const" I need to know which system function have to be blocked to block writeln, write function. And as I see I can't block it

Yes you can. See the Crt unit. In practice you have to redefine the handlers in the output handle (stdout under C) so that those handlers don't do anything with the input (or redirect it to where you want)

close(output);
assign(Output,'text.txt');
rewrite(Output);

might alread do something.

Reply by email

Maciej Łaszcz
to Marco van de Voort
Marco van de Voort wrote 10 lines
Yes you can. See the Crt unit. In practice you have to redefine the handlers in the output handle (stdout under C) so that those handlers don't do anything with the input (or redirect it to where you want) close(output); assign(Output,'text.txt'); rewrite(Output); might alread do something.

This is what I need, thank you very much

Reply by email