Fetch the name of an knowledge base attribute.
returnedString = attrname(anAttribute);
returnedString - type: str
anAttribute - type: con
A string which is the name of the passed attribute.
If you try to print out an attribute directly, you'll get an error. This function returns the string value name of an attribute. If a bad attribute is passed, an error is written to output log file.
G("myConcept") = makeconcept(findroot(),"a concept");
G("myAttr") = addattr(G("myConcept"),"an attribute");
"output.txt" << attrname(G("myAttr")) << "\n";
This prints out
an attribute