[GiNaC-list] Typo in the documentation

Richard B. Kreckel kreckel at in.terlu.de
Sat Aug 1 00:55:58 CEST 2015


On 07/31/2015 02:17 PM, Jean-Michaël Celerier wrote:
> I think that :
> 
> {
>     parser reader;
>     ex e = reader("2*x+sin(y)");
>     symtab table = reader.get_syms();
>     symbol x = reader["x"];
>     symbol y = reader["y"];
> }
> 
> 
> the two last lines should be
> 
>     symbol x = table["x"];
>     symbol y = table["y"];

You're right. Only, a symtab maps to expressions, not to symbols, so you
will have to coerce it to a symbol, first. Thanks for pointing this out.

   -richy.
-- 
Richard B. Kreckel
<http://in.terlu.de/~kreckel/>


More information about the GiNaC-list mailing list