<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 8/11/23 01:23, Hairy Pixels via
fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:7A0B8BCE-2C69-4B82-B096-3DC46308F8E9@gmail.com">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Aug 10, 2023, at 2:18 PM, Michael Van Canneyt via fpc-pascal <a class="moz-txt-link-rfc2396E" href="mailto:fpc-pascal@lists.freepascal.org"><fpc-pascal@lists.freepascal.org></a> wrote:
<a class="moz-txt-link-freetext" href="https://www.freepascal.org/docs-html/current/ref/refse15.html#x42-620003.4">https://www.freepascal.org/docs-html/current/ref/refse15.html#x42-620003.4</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
This document doesn't really do a great enumerating all the operators so I'm not sure if the list is complete. I think the list is:
var
p: pointer;
i: ^Integer;
v: Integer;
begin
// 1) increment
p := p + 1;
inc(p);
// 2) increment
p := p - 1;
dec(p);
// 3) difference
v := p - p;
// 4) subscript (inc and dereference in one step)
v := i[1];
#4 was not in the list for example so I wonder what others exist.</pre>
</blockquote>
<p>That is not true. Read that document again and focus on the part
that starts with "<span class="cmbx-10">Remark</span> Free Pascal
treats pointers much the same way as C does. This means that a
pointer to some type
can be treated as being an array of this type."</p>
<p>In fact, Free Pascal's documentation and exactly this page is how
I learned about this feature a long time ago.</p>
<p>Nikolay</p>
</body>
</html>