From cfc13f6293ca16ddaf7709513c473320a9603c55 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sun, 26 Mar 2000 04:11:07 +0200 Subject: [PATCH] Documented encode_value_canonic(). Rev: tutorial/tutorial.wmml:1.193 --- tutorial/tutorial.wmml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/tutorial/tutorial.wmml b/tutorial/tutorial.wmml index 06ecf52f72..9fed5e4597 100644 --- a/tutorial/tutorial.wmml +++ b/tutorial/tutorial.wmml @@ -11868,16 +11868,17 @@ time, localtime, mktime, gmtime -<function name=decode_value title="code a value into a string"> +<function name=decode_value title="decode a value from a string"> <man_syntax> mixed decode_value(string <I>coded_value</I>); </man_syntax> <man_description> -This function takes a string created with encode_value() and converts -it back to the value that was coded. +This function takes a string created with encode_value() or +encode_value_canonic() and converts it back to the value that was +coded. </man_description> <man_see> -encode_value +encode_value, encode_value_canonic </man_see> </function> @@ -11961,11 +11962,31 @@ structures etc. At present, objects, programs and functions cannot be saved in this way. This is being worked on. </man_description> <man_see> -decode_value, sprintf +decode_value, sprintf, encode_value_canonic </man_see> </function> +<function name=encode_value_canonic title="code a value into a string on canonical form"> +<man_syntax> +string encode_value_canonic(mixed <i>value</i>) +</man_syntax> +<man_description> +Takes a value and converts it to a string on canonical form, much like +encode_value(). The canonical form means that if an identical value is +encoded, it will produce exactly the same string again, even if it's +done at a later time and/or in another Pike process. The produced +string is compatible with decode_value(). +<p> +Note that this function is more restrictive than encode_value() with +respect to the types of values it can encode. It will throw an error +if it can't encode to a canonical form. +</man_description> +<man_see> +encode_value, decode_value +</man_see> + + <function name=enumerate title="create an array with an enumeration"> <man_syntax> array(int) enumerate(int n);<br> -- GitLab