<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>overwritting variables</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/13911/overwritting-variables</link><description> I have two different programs lets call A and B. I have a function in A called A1 which has local variables. this Calls a function in B named B1 which calls a different function in A called A2 which also has local variables. Both A1 and A2 use the same</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: overwritting variables</title><link>https://community.arm.com/thread/37082?ContentTypeID=1</link><pubDate>Thu, 04 Jan 2001 19:14:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:948974e6-f3d9-43b3-84aa-bf328765ca81</guid><dc:creator>Andrew Neil</dc:creator><description>&lt;p&gt;Unless explicitly initialised, the values of local variables are &amp;quot;indeterminate&amp;quot; on entry to a function.&lt;br /&gt;
If two functions have similar sets of local variables, it may well be that the &amp;quot;indeterminate&amp;quot; initial values &lt;i&gt;just happen to be&lt;/i&gt; the values left by the previous function; but any changes to the size, number, order, etc of the variables, or adding/removing other functions, or changes to the order of calling functions, or even Keil version changes could alter this effect.&lt;br /&gt;
&lt;br /&gt;
If you really want functions to share data, you should make that data global or, preferably, provide some more &amp;quot;object-oriented&amp;quot; means of access to it.&lt;br /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>