Bug in print2 of Tutorial
Hi, Shouldn't the lines n.find_bool(name, x); n.find_unsigned(name, x); n.find_string(name, x); in static void my_print2(const archive_node & n); of the Tutorial be replaced with the following ones: n.find_bool(name, x, j); n.find_unsigned(name, x, j); n.find_string(name, x, j); ? I noticed that when extracting info from fderivative instance. I was expecting 'D[0,1](f)(x,y)' but I was getting 'D[0,0](f)(x,y)' from 'f(x,y).diff(x).diff(y)'. The change above fixed this. As I understand, then all items in property p[i] should be of the same type. Is this always true? Regards, Pearu
Hi! On Tue, Aug 21, 2001 at 10:15:48AM +0200, Pearu Peterson wrote:
Shouldn't the lines n.find_bool(name, x); n.find_unsigned(name, x); n.find_string(name, x); in static void my_print2(const archive_node & n); of the Tutorial be replaced with the following ones: n.find_bool(name, x, j); n.find_unsigned(name, x, j); n.find_string(name, x, j); ?
Yes, the index parameter was a later addition.
As I understand, then all items in property p[i] should be of the same type. Is this always true?
Each property p[i] stores only one item of data, but the vector of properties p[] of an archive_node can contain items of different types. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Christian Bauer
-
Pearu Peterson