<div dir="ltr">Hey <span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px">Andreas,</span><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px">They are really two different things.  $geometry is really a function that takes no arguments. This has been </span><font color="#000000" face="Verdana, Geneva, sans-serif"><span style="font-size:13.3333px">deprecated in favour calling with () e.g </span></font><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px">geometry().  @ is only for variables.</span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px">So you can explain it that $ used to be a shorthand way of calling a function that took no arguments which has now been replaced with () at the end to call it. $area = area().  This becomes important because now we support optional arguments meaning you can take 0 to N arguments.</span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Verdana,Geneva,sans-serif;font-size:13.3333px">- Nathan </span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 19, 2017 at 9:53 PM, Neumann, Andreas <span dir="ltr"><<a href="mailto:a.neumann@carto.net" target="_blank">a.neumann@carto.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>Hi,</p>
<p>While preparing for a workshop on expressions I wonder how to explain why some variables are referenced with the $ sign (like $geometry) while other variables start with the @ sign, like @row_number, @layer_name.</p>
<p>I know that it has historical reasons and that variables with the @ sign are newer and are implemented using a different technology.</p>
<p>But are there plans to get rid of the old $ sign notation and move everything to the @ sign notation?</p>
<p>Just wonder how I best explain this to the participants of the workshop.</p>
<p>Thanks for your reply,</p>
<p>Andreas</p>
<div> </div>
</div>
<br>______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br></div>