Find parent concept of current concept.
returnedConcept = up(currentConcept)
returnedConcept - type: con
currentConcept - type: con
Parent concept.
If currentConcept is a bad concept, a warning is written to output log.
Run the following code using the KB shown above:
@CODE
# Find 'mother' in the KB
G("First") = findhierconcept("mother", findroot());
# goto parent concept (female)
G("Second") = up(G("First"));
"output.txt" << conceptname(G("Second")) << "\n";
# go back down to 'mother'
G("First") = down(G("Second"));
"output.txt" << conceptname(G("First")) << "\n";
# find mother's first sibling, which should be 'daughter'
G("Second") = next(G("First"));
"output.txt" << conceptname(G("Second")) << "\n";
# find daughter's previous sibling, which should be mother
G("First") = prev(G("Second"));
"output.txt" << conceptname(G("First")) << "\n";
The output should look like:
female
mother
daughter
mother