[Maxima] c-code generation
robert.dodier at gmail.com
Tue Dec 19 14:45:17 CST 2006
> Unfortunately, C does not allow to use e.g. %5 as a variable name,
> so currently I need to run the result through "sed s/%/_/g".
> Any ideas how to replace the % characters in maxima?
Try ssubst in the stringproc package. e.g.
ssubst ("a", "b", "Foobar");
Note that the arguments must be strings, so if you are trying to
sanitize a symbol I guess you want something like
ssubst ("pct", "%", string ('%o5));
Hope this helps
More information about the Maxima