[#miniscript-Compare]
= xref:miniscript.adoc[miniscript]::Compare
:relfileprefix: ../
:mrdocs:

Compare two miniscript subtrees, using a non&hyphen;recursive algorithm&period;

== Synopsis

Declared in `&lt;script&sol;miniscript&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
Compare(
    xref:miniscript/Node.adoc[Node&lt;Key&gt;] const& node1,
    xref:miniscript/Node.adoc[Node&lt;Key&gt;] const& node2);
----

== Return Value

&hyphen;1 if node1 orders before node2, 1 if after, 0 if equal&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *node1*
| The first subtree to compare&period;
| *node2*
| The second subtree to compare&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
