Browse code

pv: docs for xavp_lshift() function

Daniel-Constantin Mierla authored on 10/05/2022 17:42:48
Showing 1 changed files
... ...
@@ -732,6 +732,39 @@ xavp_child_rm("x", "y");
732 732
 ...
733 733
 xavi_child_rm("WhatEver", "FoO");
734 734
 # same result as: $xavi(whatever=>foo) = $null;
735
+...
736
+				</programlisting>
737
+			</example>
738
+		</section>
739
+		<section id="pv.f.xavp_lshift">
740
+			<title>
741
+				<function moreinfo="none">xavp_lshift(xname, idx)</function>
742
+			</title>
743
+			<para>
744
+				Left shift with rotation of the xavps with name xname so that
745
+				the one at the index idx becomes the first and the ones before
746
+				it are at the end of the list.
747
+			</para>
748
+			<para>
749
+				The first parameter has to be the name of XAVP in the root list.
750
+				The second parameter is the index of the XAVP that becomes the
751
+				first one.
752
+			</para>
753
+			<para>
754
+				The parameters can be with variables.
755
+			</para>
756
+			<para>
757
+			Function can be used from ANY ROUTE.
758
+			</para>
759
+			<example>
760
+				<title><function>xavp_lshift</function> usage</title>
761
+				<programlisting format="linespecific">
762
+...
763
+$xavp(n) = 10;
764
+$xavp(n) = 20;
765
+$xavp(n) = 30;
766
+xavp_lshift("n", "1");
767
+# results in: $xavp(n) having the list of values 20 30 10
735 768
 ...
736 769
 				</programlisting>
737 770
 			</example>