(Maybe this is the wrong place for bug reports, but I didn't find anything better.)
I just discovered a small error in the documentation at http://pike.ida.liu.se/docs/tutorial/data_types_2/container_types.xml.
In the paragraph about array division the examples for division by integers and floats have been mixed up:
# Division array / delimiter
[...]
If the delimiter is an integer, the array array will be split into arrays of size delimiter, with any extra elements ignored:
({ 7, 1, 2, 3, 4, 1, 2 }) / 3 gives the result ({ ({ 7, 1, 2 }), ({ 3, 4, 1 }), ({ 2 }) }).
If you convert the same integer to a floating-point number, the extra elements will not be thrown away:
({ 7, 1, 2, 3, 4, 1, 2 }) / 3.0 gives the result ({ ({ 7, 1, 2 }), ({ 3, 4, 1 }) }).
Thanks for noticing; fixed.
/ Johan Sundström (Achtung Liebe!)
Previous text:
2004-04-10 15:37: Subject: Error in the documentation
(Maybe this is the wrong place for bug reports, but I didn't find anything better.)
I just discovered a small error in the documentation at http://pike.ida.liu.se/docs/tutorial/data_types_2/container_types.xml.
In the paragraph about array division the examples for division by integers and floats have been mixed up:
# Division array / delimiter
[...]
If the delimiter is an integer, the array array will be split into arrays of size delimiter, with any extra elements ignored:
({ 7, 1, 2, 3, 4, 1, 2 }) / 3 gives the result ({ ({ 7, 1, 2 }), ({ 3, 4, 1 }), ({ 2 }) }).
If you convert the same integer to a floating-point number, the extra elements will not be thrown away:
({ 7, 1, 2, 3, 4, 1, 2 }) / 3.0 gives the result ({ ({ 7, 1, 2 }), ({ 3, 4, 1 }) }).
/ Emil Styrke
pike-devel@lists.lysator.liu.se