<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial, sans-serif" size="3">
<div>&nbsp;</div>
<div><font size="2">There's probably an easy explanation for this. I was wondering about why functions inside of rule files can't access globals?</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">For example, I have a log4j logger that I pass into my rule files via a global.&nbsp; The logger should never be a part of working memory. It's just there to capture valuable feedback.</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">But I can't do this:</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">global Logger log;</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">function void foo(String cond)</font></div>
<div><font size="2">{</font></div>
<div><font size="2">&nbsp;&nbsp; if (cond == &quot;error&quot;)</font></div>
<div><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log.error(&quot;I saw an error&quot;);</font></div>
<div><font size="2">}</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">Because the compiler says that in the function it can't resolve 'log'.</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font size="2">-A</font></div>
<div><font size="2">&nbsp;</font></div>
<div><font face="Tahoma, sans-serif" size="2" color="#008080">Allen F. Bagwell</font></div>
<div><font face="Tahoma, sans-serif" size="1" color="#008080">e-mail:&nbsp; afbagwe@sandia.gov</font></div>
<div><font face="Tahoma, sans-serif" size="1" color="#008080">phone:&nbsp; 505/284-4517</font></div>
<div><font face="Tahoma, sans-serif" size="1" color="#008080">fax:&nbsp; 505/ 844-7886</font></div>
<div><font face="Tahoma, sans-serif" size="1" color="#008080">&nbsp;</font></div>
<div style="margin-top: 5pt; margin-bottom: 5pt; "><font face="Tahoma, sans-serif" size="1" color="#008080">There is no monument dedicated to the memory of a committee. -- Lester J. Pourciau</font></div>
<div><font face="Tahoma, sans-serif" size="1">&nbsp;</font></div>
<div><font face="Tahoma, sans-serif" size="1">&nbsp;</font></div>
<div><font size="2">&nbsp;</font></div>
</font>
</body>
</html>