<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/11/13 Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Am 13.11.2013 11:07, schrieb Frederic
Da Vitoria:<br>
</div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">2013/11/13 Rainer Stratmann <span dir="ltr"><<a href="mailto:rainerstratmann@t-online.de" target="_blank">rainerstratmann@t-online.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On Wednesday 13 November 2013 10:52:23 you wrote:<br>
<div>> 2013/11/13 Rainer Stratmann <<a href="mailto:rainerstratmann@t-online.de" target="_blank">rainerstratmann@t-online.de</a>><br>
> > Is there a description of the behaviour of
const and var in this case?<br>
> > Why is it not both const or both var?<br>
><br>
> "source" is where the data "comes from", so the
procedure won't modify it<br>
> (if there is no memory overlap between source and
dest), so it is declared<br>
> as "const"<br>
> "dest" is where the data is copied to, so the
procedure will necessarily<br>
> modify it (if "count" is <> 0), and the
procedure should modify so it is<br>
> declared as "var". Actually, IMO it could be
declared as "out", this would<br>
> avoid a meaningless warning.<br>
<br>
</div>
But why does it work without specifying the vars more
exactly like in other<br>
cases?<br>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">You mean, how can it work without using
typed variables? In Pascal, you don't have to give the type of
a parameter, although 99.99% of the times you should do it. If
you don't do it, you could as well use assembly :-) Actually,
that's probably how Move is written: in assembly language. Of
course, since the types were not given in the parameter
declaration of Move, the compiler can't know the size of the
data, and you have to give the compiler some indication.
That's what "count" is for. Move considers the memory as 2 big
arrays of bytes, one starting at "source", and the second at
"dest".<br clear="all">
</div>
</div>
</blockquote></div></div>
The fallback implementation (for new architectures) is written in
Pascal. See $fpcdir\rtl\inc\generic.inc.<br></div></blockquote></div><br></div><div class="gmail_extra">Of course it is, I should have guessed it, Lazarus/FPC is multi-platform. I keep thinking as if I was using a Windows-only development tool.<br clear="all">
</div><div class="gmail_extra"><br>-- <br>Frederic Da Vitoria<br>(davitof)<br><br>Membre de l'April - « promouvoir et défendre le logiciel libre » - <a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</div></div>