[GiNaC-devel] patch: valid C code for idx class with print_csrc

Markus Grabner grabner at icg.tugraz.at
Mon Jul 2 13:42:14 CEST 2007


	Hi!

    Printing an indexed expression using an instance of the print_csrc_double 
class produces invalid C code (the same syntax that is used in the tutorial 
http://www.ginac.de/tutorial/Indexed-objects.html#Indexed-objects) in 
ginac-1.3.7. I understand that the index class in ginac is more powerful than 
the indexing facilities of the C language, but still I expected 
print_csrc_double to produce valid C code simply due to its name. So I added 
a few lines which handle the case of integer indices (numeric or symbolic) 
stored in the idx class (patch attached).

	Kind regards,
		Markus


-- 
Markus Grabner - Computer Graphics and Vision
Graz University of Technology, Inffeldgasse 16a/II, 8010 Graz, Austria
Phone: +43/316/873-5041, Fax: +43/316/873-5050
WWW: http://www.icg.tugraz.at/Members/grabner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ginac-csrc-index.patch
Type: text/x-diff
Size: 1538 bytes
Desc: not available
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20070702/fcadf244/attachment.bin>


More information about the GiNaC-devel mailing list