From 48c94e7103f2568d653d13f3a10548ab9f1f891d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Mon, 25 May 1998 23:01:49 +0200 Subject: [PATCH] Added some information about functions operating on programs. Rev: tutorial/tutorial.wmml:1.88 --- tutorial/tutorial.wmml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tutorial/tutorial.wmml b/tutorial/tutorial.wmml index 56cc9c71fa..26c87d0bb7 100644 --- a/tutorial/tutorial.wmml +++ b/tutorial/tutorial.wmml @@ -1821,6 +1821,25 @@ section again. <dd> As with all data types <tt>==</tt> and <tt>!=</tt> can be used to see if two programs are the same or not. </dl> +<p> +The following operators and functions are important: +<dl> +<dt> cloning ( <tt><i>p</i> ( <i>args<i> )</tt> ) +<dd> Creates an object from a program. Discussed in the next section. + +<dt> indexing ( <tt><i>p</i> [ <i>string</i> ]</tt>, or + <tt><i>p</i> -> <i>identifier</i></tt> ) +<dd> Retreives the value of the named constant from a program. + +<dt> <tt>array(string) indices(program <i>p</i>)</tt> +<dd> Returns an array with the names of all non-static constants in the + program. + +<dt> <tt>array(mixed) values(program <i>p</i>)</tt> +<dd> Returns an array with the values of all non-static constants in the + program. +</dl> + </section> @@ -2497,6 +2516,16 @@ can only be indexed on certain things as shown in this list: </tt></td><td>Set the given identifier in the object to the mixed value. Only works if the identifier references a variable in the object.</td> </tr> + +<tr> +<td><tt> + <i>program</i>[<i>string</i>]<br> + <i>program</i>-><i>identifier</i><br> + </tt></td><td>Returns the value of the named constant identifier + in the program.</td> +</tr> + + <tr> <td><tt><i>string</i>[<i>int</i>..<i>int</i>]</tt></td><td>Returns a piece of the string.</td> </tr> -- GitLab