<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Mr Bee via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am So., 2. Feb. 2020, 02:11:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div><div dir="ltr">Hi all,</div><div dir="ltr"><br></div><div dir="ltr">Besides overloading available operators, could we make our own custom operator(s) in FPC?</div><div dir="ltr"><br></div><div dir="ltr">For example, I want to use ∑ to sum array values? Also other Unicode characters such as ≥, ≤, ±, ≠, etc as custom operators? I think such feature is important in this unicode era.</div><div dir="ltr"><br></div><div dir="ltr">Is it possible?</div></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">No, it is not (okay, technically, in theory it would be possible, but definitely not desired). The compiler would need to know such operators so that it can determine the precedence. You can just as well use methods/functions for that with the added benefit that they can be named in a way that explains their purpose. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>