Update Documentation - Low Level Function - PtrCmp() Function.
@@ -13,6 +13,7 @@ In this chapter we will learn about the low level functions provided by Ring
* nullpointer()
* object2pointer()
* pointer2object()
+* ptrcmp()
* ringvm_cfunctionslist()
* ringvm_functionslist()
* ringvm_classeslist()
@@ -215,6 +216,42 @@ Output:
.. tip:: The object2pointer() and pointer2object() are used in the stdlib - Tree Class implementation
to create a reference for the parent node (object) in the child node (another object).
+.. index::
+ pair: Low Level Functions; ptrcmp()
+
+ptrcmp() function
+================================
+
+We can compare between two pointers (C Objects) using the ptrcmp() function.
+
+Syntax:
+
+.. code-block:: ring
+
+ ptrcmp(oObject1,oObject2) ---> value = 1 if oObject1 = oObject2
+ value = 0 if oObject1 != oObject2
+
+Example:
+
+.. code-block:: ring
+
+ fp = fopen("ptrcmp.ring","r")
+ fp2 = fp
+ fp3 = fopen("ptrcmp.ring","r")
+
+ see ptrcmp(fp,fp2) + nl
+ see ptrcmp(fp,fp3) + nl
+
+ fclose(fp)
+ fclose(fp3)
+
+Output:
+
+.. code-block:: ring
+
+ 1
+ 0
+
.. index::
pair: Low Level Functions; RingVM_CFunctionsList()
