Branch: Tag:

1995-11-20

1995-11-20 16:01:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

no more macro calls with empty args

Rev: src/compilation.h:1.4

6:   <text>   <p><tt>PI</tt> - pi</p>    - <tt><p>pi<br/> + <tt><p>PI<br/>   </p>   </tt>   <p>This is not a function, it is a constant added by simulate.lpc.
116:   ({ elem1, elem2, ... })<br/>   </p>   </tt> - <p>Construct an array with the arguments as indexes. This function + <p>Construct an array with the arguments as indices. This function   could be written in LPC as:   </p>   <p>mixed *aggregate(mixed ... elems) { return elems; }</p>
126:   <p>Arrays are dynamically allocated there is no need to declare them   like int a[10]=allocate(10); (and it isn't possible either) like   in C, just int *a=allocate(10); will do.</p> - </text></group> +     -  + array</text></group> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref> and <ref resolved='predef::allocate' to='allocate'>allocate</ref></p>   </text></group>
148:   could be written in LPC as:   </p>   <p>list aggregate(mixed ... elems) { return mklist(elems); }</p> - </text> +     -  + list</text> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::mklist' to='mklist'>mklist</ref></p>   </text></group>
161:   <text>   <p><tt>aggregate_mapping</tt> - construct a mapping</p>    - <tt><p>mapping aggregate_list(mixed ... <i>elems</i>);<br/> + <tt><p>mapping aggregate_mapping(mixed ... <i>elems</i>);<br/>   or<br/>   (&lt; key1:val1, key2:val2, ... &gt;)<br/>   </p>
169:   <p>Groups the arguments together two and two to key-index pairs and   creates a mapping of those pairs. The second syntax is always   preferable.</p> - </text> +     -  + list</text> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref> and <ref resolved='predef::mkmapping' to='mkmapping'>mkmapping</ref></p>   </text></group>
223:   <p>Arrays are dynamically allocated there is no need to declare them   like int a[10]=allocate(10); (and it isn't possible either) like   in C, just int *a=allocate(10); will do.</p> - </text></group> +     -  + array</text></group> +    <group><seealso/><text>   <p><ref resolved='predef::sizeof' to='sizeof'>sizeof</ref>, <ref resolved='predef::aggregate' to='aggregate'>aggregate</ref> and <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref></p>   </text></group>
295:   </p>   </tt>   <p>Returns 1 if arg is an array, zero otherwise.</p> - </text> +     -  + array</text> +    <group><seealso/><text>   <p><ref resolved='predef::allocate' to='allocate'>allocate</ref>, <ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
541:   It creates an instance of the class p. This clone will first have   all global variables initalized, and then create() will be called   with args as arguments.</p> - </text> +     -  + object and program</text> +    <group><seealso/><text>   <p><ref resolved='predef::destruct' to='destruct'>destruct</ref>, <ref resolved='predef::compile_string' to='compile_string'>compile_string</ref> and <ref resolved='predef::compile_file' to='compile_file'>compile_file</ref></p>   </text></group>
603:   </tt>   <p>This function will compile the filename to an LPC program that can   later be used for cloning.</p> - </text> +     -  + program</text> +    <group><seealso/><text>   <p><ref resolved='predef::clone' to='clone'>clone</ref> and <ref resolved='predef::compile_string' to='compile_string'>compile_string</ref></p>   </text></group>
623:   string prog and compiles it to clonable program. The second argument   will be used as the file name of the program and will be used for   error messages and such.</p> - </text> +     -  + program</text> +    <group><seealso/><text>   <p><ref resolved='predef::compile_string' to='compile_string'>compile_string</ref> and <ref resolved='predef::clone' to='clone'>clone</ref></p>   </text></group>
758:   </tt>   <p>Destruct marks an object as destructed, all pointers and function   pointers to this object will become zero. The destructed object will - be freed from memory as soon as possible.</p> - </text> + be freed from memory as soon as possible. This will also call + o-&gt;destroyed.</p>    -  + object</text> +    <group><seealso/><text>   <p><ref resolved='predef::clone' to='clone'>clone</ref></p>   </text></group>
917:   &gt; explode("foobar","");<br/>   Result: ({ "f", "o", "o", "b", "a", "r" })<br/>   </p> - </tt></text></group> + </tt> + string</text></group>      <group><seealso/><text>   <p><ref resolved='predef::implode' to='implode'>implode</ref></p>
1086:   </p>   </tt>   <p>Returns 1 if arg is a float, zero otherwise.</p> - </text> +     -  + float</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
1167:   </tt>   <p>This function returns the name of the function f. If the function is   a pre-defined function in the driver, zero will be returned.</p> - </text> +     -  + function</text> +    <group><seealso/><text>   <p><ref resolved='predef::function_object' to='function_object'>function_object</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p>   </text></group>
1186:   <p>Function_object will return the object the function f is in. If the   function is a predefined function from the driver, zero will be   returned.</p> - </text> +     -  + function</text> +    <group><seealso/><text>   <p><ref resolved='predef::function_name' to='function_name'>function_name</ref> and <ref resolved='predef::get_function' to='get_function'>get_function</ref></p>   </text></group>
1203:   </p>   </tt>   <p>Returns 1 if arg is a function, zero otherwise.</p> - </text> +     -  + function</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::floatp' to='floatp'>floatp</ref></p>   </text></group>
1309:   </tt>   <p>This function will return an int derived from the string s. The same   string will always hash to the same value. If a second argument - is given, the result will be &gt;= 0 and lesser than that argument. - </p> - </text> + is given, the result will be &gt;= 0 and lesser than that argument.</p>    -  + string</text> +    </doc>   </docgroup>   <docgroup homogen-name='hilfe' homogen-type='method'>
1408:   Result: a and b and c<br/>   &gt; <br/>   </p> - </tt></text></group> + </tt> + string</text></group>      <group><seealso/><text>   <p><ref resolved='predef::explode' to='explode'>explode</ref></p>
1421:   <text>   <p><tt>indices</tt> - return an array of all index possible for a value</p>    - <tt><p>mixed *indices(string|array|mapping|list <i>foo</i>);<br/> + <tt><p>mixed *indices(string|array|mapping|list|object <i>foo</i>);<br/>   </p>   </tt>   <p>Indices returns an array of all values you can use as index when   indexing foo. For strings and arrays this is simply an array of the   ascending numbers. For mappings and lists, the array may contain any - kind of value.</p> - </text> + kind of value. For objects, the result is an array of strings.</p>    -  + mapping and list</text> +    <group><seealso/><text>   <p><ref resolved='predef::values' to='values'>values</ref></p>   </text></group>
1487:   </p>   </tt>   <p>Returns 1 if arg is an int, zero otherwise.</p> - </text> +     -  + int</text> +    <group><seealso/><text>   <p><ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
1616:   </p>   </tt>   <p>Returns 1 if arg is a list, zero otherwise.</p> - </text> +     -  + list</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
1651:   </p>   </tt>   <p>Return a string with all capital letters converted to lower case.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::upper_case' to='upper_case'>upper_case</ref></p>   </text></group>
1672:   entry with index 'index', nothing is done.   Note that m_delete changes map destructively and only returns   the mapping for compatibility reasons.</p> - </text> +     -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::mappingp' to='mappingp'>mappingp</ref></p>   </text></group>
1825:   </p>   </tt>   <p>Returns 1 if arg is a mapping, zero otherwise.</p> - </text> +     -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
1917:   <p>Makes a mapping ind[x]:val[x], 0&lt;=x&lt;sizeof(ind).   Ind and val must have the same size.   This is the inverse operation of indices and values.</p> - </text> +     -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::indices' to='indices'>indices</ref> and <ref resolved='predef::values' to='values'>values</ref></p>   </text></group>
1965:   for(o=next_object();o;o=next_object(o))<br/>   <dl><group><text>o-&gt;shutting_down();<br/>   </text></group></dl></p> - </tt></text></group> + </tt> + object</text></group>      <group><seealso/><text>   <p><ref resolved='predef::clone' to='clone'>clone</ref> and <ref resolved='predef::destruct' to='destruct'>destruct</ref></p>
2013:   </p>   </tt>   <p>This function returns the program from which o was cloned.</p> - </text> +     -  + object</text> +    <group><seealso/><text>   <p><ref resolved='predef::clone' to='clone'>clone</ref></p>   </text></group>
2030:   </p>   </tt>   <p>Returns 1 if arg is an object, zero otherwise.</p> - </text> +     -  + object</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
2076:   <text>   <p><tt>pow</tt> - Raise a number to the power of another.</p>    - <tt><p>float exp(float <i>n</i>, float <i>x</i>);<br/> + <tt><p>float pow(float <i>n</i>, float <i>x</i>);<br/>   </p>   </tt>   <p>Return n raised to the power of x.</p>
2133:   </p>   </tt>   <p>Returns 1 if arg is a program, zero otherwise.</p> - </text> +     -  + program</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::stringp' to='stringp'>stringp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
2184:   </p>   </tt>   <p>This function returns a random number in the range 0 - max-1.</p> - </text> +     -  + int</text> +    <group><seealso/><text>   <p><ref resolved='predef::random_seed' to='random_seed'>random_seed</ref></p>   </text></group>
2223:   Result: 94<br/>   &gt;<br/>   </p> - </tt></text></group> + </tt> + int</text></group>      <group><seealso/><text>   <p><ref resolved='predef::random' to='random'>random</ref></p>
2319:   <dl><group><text>When the first argument is an array or mapping, the values in<br/>   a are searched for values equal to from, which are replaced by<br/>   to destructively.<br/> - </text></group></dl><br/> - </p> - </text> + </text></group></dl></p>    -  + string, array and mapping</text> +    </doc>   </docgroup>   <docgroup homogen-name='reverse' homogen-type='method'>
2341:   by value or an int, bit by bit and returns the result. Reversing   strings can be particularly useful for parsing difficult syntaxes   which require scanning backwards.</p> - </text> +     -  + string, array and int</text> +    <group><seealso/><text>   <p><ref resolved='predef::sscanf' to='sscanf'>sscanf</ref></p>   </text></group>
2446:      <group><note/><text>   <p>This function replaces strstr and member_array from LPC4.</p> - </text></group> +     -  + string, array and mapping</text></group> +    <group><seealso/><text>   <p><ref resolved='predef::indices' to='indices'>indices</ref>, <ref resolved='predef::values' to='values'>values</ref> and <ref resolved='predef::zero_type' to='zero_type'>zero_type</ref></p>   </text></group>
2579:   </tt>   <p>This function returns the number of indexes available in the argument   given to it. It replaces older functions like strlen, m_sizeof and - size. - </p> - </text> + size.</p>    -  + string, list, mapping and array</text> +    </doc>   </docgroup>   <docgroup homogen-name='sleep' homogen-type='method'>
2657:   <p><tt>sprintf</tt> - print the result from sprintf</p>      <tt><p>string sprintf(string <i>format</i>,mixed <i>arg</i>,....);<br/> - <br/> - DESCRIPTION<br/> - The format string is a string containing a description of how to<br/> - output the data in the rest of the arguments. This string should<br/> - generally speaking have one %<i>modifyers</i><i>operator</i> (examples:<br/> - %s, %0d, %-=20s) for each of the rest arguments.<br/> -  +    </p> -  + </tt> + <p>The format string is a string containing a description of how to + output the data in the rest of the arguments. This string should + generally speaking have one %&lt;modifyers&gt;&lt;operator&gt; (examples: + %s, %0d, %-=20s) for each of the rest arguments. + </p>   <p>Modifyers:<br/>   <dl><group><text>0 Zero pad numbers (implies right justification)<br/>   ! Toggle truncation<br/> - <dl><group><text>pad positive integers with a space<br/> - </text></group></dl>+ pad positive integers with a plus sign<br/> + ' ' (space) pad positive integers with a space<br/> + + pad positive integers with a plus sign<br/>   - left adjusted within field size (default is right)<br/>   | centered within field size<br/>   = column mode if strings are greater than field size<br/>
2706:   %O any type (debug style)<br/>   %n nop<br/>   %t type of argument<br/> - %<i>modifyers</i>{format%} do a format for every index in an array.<br/> + %&lt;modifyers&gt;{format%} do a format for every index in an array.<br/>   </text></group></dl></p> - </tt></text> + </text>      <group><example/><text>   <tt><p>uLPC v1.0E-95 Running Hilfe v1.2 (Hubbe's Incremental LPC FrontEnd)<br/>
2883:   will not only match it's argument, not assign any variables.   </p>   <p>Number of matched arguments is returned.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::explode' to='explode'>explode</ref> and <ref resolved='predef::sprintf' to='sprintf'>sprintf</ref></p>   </text></group>
2943:   </p>   </tt>   <p>Returns 1 if arg is a string, zero otherwise.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::intp' to='intp'>intp</ref>, <ref resolved='predef::listp' to='listp'>listp</ref>, <ref resolved='predef::arrayp' to='arrayp'>arrayp</ref>, <ref resolved='predef::programp' to='programp'>programp</ref>, <ref resolved='predef::objectp' to='objectp'>objectp</ref>, <ref to='regexpp'>regexpp</ref>, <ref resolved='predef::mappingp' to='mappingp'>mappingp</ref>, <ref resolved='predef::floatp' to='floatp'>floatp</ref> and <ref resolved='predef::functionp' to='functionp'>functionp</ref></p>   </text></group>
3006:   </tt>   <p>This function does exactly the same thing as adding all the arguments   together with +. It's just here so you can get a function-pointer to - the summation operator. - </p> - </text> + the summation operator.</p>    -  + int, float, string, array, mapping and list</text> +    </doc>   </docgroup>   <docgroup homogen-name='sum_arrays' homogen-type='method'>
3105:   <tt><p>object this_object();<br/>   </p>   </tt> - <p>This function returns the object we are curently evaluating in. - </p> - </text> + <p>This function returns the object we are curently evaluating in.</p>    -  + object</text> +    </doc>   </docgroup>   <docgroup homogen-name='throw' homogen-type='method'>
3186:   </tt>   <p>Return a copy of the string s with all lower case character converted   to upper case character.</p> - </text> +     -  + string</text> +    <group><seealso/><text>   <p><ref resolved='predef::lower_case' to='lower_case'>lower_case</ref></p>   </text></group>
3199:   <text>   <p><tt>values</tt> - return an array of all possible values from indexing</p>    - <tt><p>mixed *values(string|list|mapping|array <i>foo</i>);<br/> + <tt><p>mixed *values(string|list|mapping|array|object <i>foo</i>);<br/>   </p>   </tt>   <p>Values return an array of all values you can get when indexing the   value foo. For strings, an array of int with the ascii values of the   characters in the string is returned. For a list, an array filled with - ones is return. For mappings and arrays, the returned array may - contain any kind of value.</p> - </text> + ones is return. For mappings, objects and arrays, the returned array + may contain any kind of value.</p>    -  + mapping</text> +    <group><seealso/><text>   <p><ref resolved='predef::indices' to='indices'>indices</ref></p>   </text></group>
3285:   When doing a find_call_out or mapping lookup, zero_type on this value   will return 1 if there was no such thing present in the mappping, or   no such call_out could be found. Otherwize zero_type will return zero.</p> - </text> +     -  + int</text> +    <group><seealso/><text>   <p><ref resolved='predef::find_call_out' to='find_call_out'>find_call_out</ref></p>   </text></group>