Branch: Tag:

1996-06-09

1996-06-09 15:06:02 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

second argument to file->read added

Rev: src/modules/files/doc/file:1.2
Rev: src/modules/files/file.c:1.14

1396:      </doc>   </docgroup> + <docgroup homogen-name='column' homogen-type='method'> + <method name='column'/><doc placeholder='true'> + <text> + <p><tt>column</tt> - extract a column</p> +  + <tt><p>array column(mixed *data,mixed index)<br/> + </p> + </tt> + <p>This function is exactly equivialent to: + </p> + <p>map_array(index,lambda(mixed x,mixed y) { return x[y]; },data) + </p> + <p>Except of course it is a lot shorter and faster. + That is, it indexes every index in the array data on the value of + the argument index and returns an array with the results.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::rows' to='rows'>rows</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='combine_path' homogen-type='method'>   <method name='combine_path'/><doc placeholder='true'>   <text>
3686:      </doc>   </docgroup> + <docgroup homogen-name='rows' homogen-type='method'> + <method name='rows'/><doc placeholder='true'> + <text> + <p><tt>rows</tt> - select a set of rows from an array</p> +  + <tt><p>array rows(mixed data, mixed *index)<br/> + </p> + </tt> + <p>This function is exactly equivialent to: + </p> + <p>map_array(index,lambda(mixed x,mixed y) { return y[x]; },data) + </p> + <p>Except of course it is a lot shorter and faster. + That is, it indexes data on every index in the array index and + returns an array with the results.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::column' to='column'>column</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='rusage' homogen-type='method'>   <method name='rusage'/><doc placeholder='true'>   <text>
3927:      </doc>   </docgroup> + <docgroup homogen-name='sort' homogen-type='method'> + <method name='sort'/><doc placeholder='true'> + <text> + <p><tt>sort</tt> - sort an array destructively</p> +  + <tt><p>mixed *sort(array(mixed) <i>index</i>, array(mixed) ... <i>data</i>);<br/> + </p> + </tt> + <p>This function sorts the array 'index' destructively. That means + that the array itself is changed and returned, no copy is created. + If extra arguments are given, they are supposed to be arrays of the + same size. Each of these arrays will be modified in the same way as + 'index'. Ie. if index 3 is moved to position 0 in 'index' index 3 + will be moved to position 0 in all the other arrays as well. + </p> + <p>Sort can sort strings, integers and floats in ascending order. + Arrays will be sorted first on the first element of each array. + </p> + <p>Sort returns it's first argument.</p> +  + array</text> +  + <group><seealso/><text> + <p><ref resolved='predef::reverse' to='reverse'>reverse</ref></p> + </text></group> +  + </doc> + </docgroup>   <docgroup homogen-name='sort_array' homogen-type='method'>   <method name='sort_array'/><doc placeholder='true'>   <text>
4249:   </p>   <p><matrix>   <r><c> \n </c><c> newline </c></r> - <r><c> \r </c><c> charriage return </c></r> + <r><c> \r </c><c> carriage return </c></r>   <r><c> \t </c><c> tab </c></r>   <r><c> \b </c><c> backspace </c></r>   <r><c> \" </c><c> " </c></r>
5186:   <p><tt>read</tt> - read data from a file or stream</p>      <tt><p>string file-&gt;read(int <i>nbytes</i>);<br/> + or<br/> + string file-&gt;read(int <i>nbytes</i>, int <i>notall</i>);<br/>   </p>   </tt>   <p>Read tries to read nbytes bytes from the file, and return it as a - string. If something goes wrong, zero is returned.</p> + string. If something goes wrong, zero is returned. + </p> + <p>If a one is given as second argument to read(), read will not try + it's best to read as many bytes as you asked it to read, it will + merely try to read as many bytes as the system read function will + return. This mainly useful with stream devices which can return + exactly one row or packet at a time.</p>   </text>      <group><seealso/><text>