[fpc-pascal] Where is the 'write' function defined and how is it different from 'writeln'?
leledumbo
leledumbo_cool at yahoo.co.id
Fri Mar 20 19:01:07 CET 2015
> Where is the 'write' function defined and how is it different from
'writeln'?
>
> I can see a lot of fpc_writeXXX and other xxxxWrite functions, but no
> 'write' itself
those fpc_writeXXX ARE the actual write. Write(Ln) is NOT a function as like
others whose implementation you can clearly see. It's rather a command for
the compiler to translate to the correct fpc_writeXXX call. So, if you:
WriteLn(123,' is an integer');
the compiler will translate it to:
fpc_write_text_shortint(123);
fpc_write_text_shortstring('is an integer');
fpc_writeln_end;
The same case applies to Read(Ln). AFAIK Pascal's I/O is part of the
language, not the RTL.
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Where-is-the-write-function-defined-and-how-is-it-different-from-writeln-tp5721427p5721428.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
More information about the fpc-pascal
mailing list