<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Using variables</title><link>https://sourceforge.net/p/resparser/wiki/Using%2520variables/</link><description>Recent changes to Using variables</description><atom:link href="https://sourceforge.net/p/resparser/wiki/Using%20variables/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 27 Oct 2013 14:30:07 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/resparser/wiki/Using%20variables/feed" rel="self" type="application/rss+xml"/><item><title>Using variables modified by Gianluigi Forte</title><link>https://sourceforge.net/p/resparser/wiki/Using%2520variables/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="using-variables"&gt;Using variables&lt;/h1&gt;
&lt;p&gt;Variables can be used to store intermediate result of an operation for later reuse.&lt;br /&gt;
Let make an example: we want to compute the area of two squares. The first has a side of 3.14 and the second has a side that is double of the other. So let start to store the side of the first in the variable &lt;strong&gt;L1&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;L1=3.14&lt;br /&gt;
&lt;strong&gt;ans=3.14&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then we can use &lt;strong&gt;L1&lt;/strong&gt; to compute the second square side &lt;strong&gt;L2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;L2=L1*2&lt;br /&gt;
&lt;strong&gt;ans=6.28&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and the area of first square &lt;strong&gt;A1&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A1=L1*L1&lt;br /&gt;
&lt;strong&gt;ans=9.8596&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To compute the area of second square &lt;strong&gt;A2&lt;/strong&gt; is possible to use the variable &lt;strong&gt;L2&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A2=L2*L2&lt;br /&gt;
&lt;strong&gt;ans=39.4384&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At this point we can show the status of all the variable using the command &lt;strong&gt;ls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;ls&lt;br /&gt;
[Variable: Name={ans}, Value={39.4384}]&lt;br /&gt;
[Variable: Name={L1}, Value={3.14}]&lt;br /&gt;
[Variable: Name={L2}, Value={6.28}]&lt;br /&gt;
[Variable: Name={A1}, Value={9.8596}]&lt;br /&gt;
[Variable: Name={A2}, Value={39.4384}]&lt;/p&gt;
&lt;p&gt;or in a graphical way view-&amp;gt;variables or the accelerator Ctrl+Shift+V&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: it is possible to use &lt;strong&gt;ans&lt;/strong&gt;, that contains the last result of operation, like any other variable.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gianluigi Forte</dc:creator><pubDate>Sun, 27 Oct 2013 14:30:07 -0000</pubDate><guid>https://sourceforge.netb5ef5707f1a6aa41c9967e5d1011baef517cd6df</guid></item></channel></rss>