<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 20 March 2015 at 19:34, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Am 20.03.2015 19:19 schrieb "vfclists ." <<a href="mailto:vfclists@gmail.com" target="_blank">vfclists@gmail.com</a>>:</p><div><div class="h5"><br>
><br>
><br>
><br>
> On 20 March 2015 at 18:01, leledumbo <<a href="mailto:leledumbo_cool@yahoo.co.id" target="_blank">leledumbo_cool@yahoo.co.id</a>> wrote:<br>
>><br>
>> > Where is the 'write' function defined and how is it different from<br>
>> 'writeln'?<br>
>> ><br>
>> > I can see a lot of fpc_writeXXX and other xxxxWrite functions, but no<br>
>> > 'write' itself<br>
>><br>
>> those fpc_writeXXX ARE the actual write. Write(Ln) is NOT a function as like<br>
>> others whose implementation you can clearly see. It's rather a command for<br>
>> the compiler to translate to the correct fpc_writeXXX call. So, if you:<br>
>><br>
>> WriteLn(123,' is an integer');<br>
>><br>
>> the compiler will translate it to:<br>
>><br>
>> fpc_write_text_shortint(123);<br>
>> fpc_write_text_shortstring('is an integer');<br>
>> fpc_writeln_end;<br>
>><br>
>> The same case applies to Read(Ln). AFAIK Pascal's I/O is part of the<br>
>> language, not the RTL.<br>
>><br>
>><br>
><br>
> Where does the output go? Is it for stdout, strderr or the console?</div></div><p></p>
<p>It depends.</p>
<p>Write('foobar');</p>
<p>Will write to whatever Textfile is contained in Output and</p>
<p>Write(xyz, 'foobar');</p>
<p>Will write to the xyz Textfile. And these Textfiles can basically be anything. By default Output simply writes to StdOut (there's also a variable for StdErr, but I have forgotten how it's called...), but you could also use an implementation that writes to a TStream or one which uses sockets. It's quite flexible...</p>
<p>Regards,<br>
Sven</p>
<br clear="all"></blockquote><div>How do you ensure own implementation overrides the system's implementation, does the compiler take care of that automatically, or will you have to name your function differently? <br></div></div><br>-- <br><div class="gmail_signature">Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a></div>
</div></div>