<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 class="im">> 2013/11/13 Rainer Stratmann <<a href="mailto:rainerstratmann@t-online.de">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 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>