<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>findattr</title>

<!--(Meta)==========================================================-->

<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=727>
<meta name=layout-width content=916>
<meta name=date content="01 4, 2002 1:05:24 PM">


<!--(Links)=========================================================-->

<link REL=StyleSheet HREF=default.css>



</head>

<!--(Body)==========================================================-->


<body>

<h1>findattr</h1>

<h2>Purpose</h2>

<p>Fetch the attribute named <span style="font-style: italic;">nameString</span> 
 belonging to the concept <span style="font-style: italic;">concept</span>.</p>

<h2>Syntax</h2>

<p style="line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">returnedAttribute = findattr(concept, nameString);</p>

<p style="margin-left: 40px;
			line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">returnedAttribute - type: attr<br>
concept - type: con<br>
nameString - type: str</p>

<h2>Returns</h2>

<p>An attribute if the concept has an attribute named <span style="font-weight: normal;">nameString</span>. 
 If nameString is not a attribute of concept, findattr returns 0.</p>

<h2>Remarks</h2>

<p>If a bad concept is passed, a warning is written to output log file 
 - &quot;warning: given no concept.&quot;</p>

<h2>Example</h2>

<p style="line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">G(&quot;myConcept&quot;) = makeconcept(findroot(),&quot;a concept&quot;); <br>
G(&quot;myAttr&quot;) = addattr(G(&quot;myConcept&quot;),&quot;an attribute&quot;); <br>
&quot;output.txt&quot; &lt;&lt; attrname(<span style="font-weight: bold; x-text-underline: normal; /*begin!kadov{{*/ text-decoration: underline; /*}}end!kadov*/ ">findattr</span>(G(&quot;myConcept&quot;),&quot;an attribute&quot;)) &lt;&lt; &quot;\n&quot;;<br>
G(&quot;junk&quot;) = <span style="font-weight: bold; x-text-underline: normal; /*begin!kadov{{*/ text-decoration: underline; /*}}end!kadov*/ ">findattr</span>(G(&quot;myConcept&quot;),&quot;duh&quot;); <br>
&quot;output.txt&quot; &lt;&lt; &quot;junk = &quot; &lt;&lt; G(&quot;junk&quot;);</p>

<p>This prints the following to output.txt:</p>

<p style="line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-family: monospace;
			font-size: 10pt;">an attribute<br>
junk = 0</p>

<h2>See Also</h2>

<p style="margin-bottom: 0;"><a HREF="findattrs.htm">findattrs</a>, <a 
 href="Table_of_Knowledge_Base_Functions.htm">Knowledge Base Functions</a> 
 </p>

</body>

</html>
