A query call is directed to to either a query, template or flow and is another operation having a function format. The function name corresponds to the target name and the return type is determined by the target. In the case of the target being a template or flow, an axiom is always returned. Any function parameters are formed into an axiom to be unified with the target as an initial step.
Query target
birds2.taq demonstrates a call to the "waterfowl" query of birds.taq. This query returns an axiom list which is assigned to a cursor to allow iteration over the list
Note that a "list_non_blanks" library function filters out non-blank terms and returns a string list.
Template target
circum.taq calculates the circumference of a circle given it's radius with the help of a call to a template named "x_by_factor". This multiplies 2 decimals "x" and "factor". In this case, x is the radius and factor is the number pi (3.14). The returned value is an axiom with a single term named "product", the value of which is multiplied by 2 to give the required answer.
{
{
decimal x
(
flow radius_by_2pi
{ decimal radius }
(
->product,
query<term> circumference(radius_by_2pi)