New in Wolfram
Mathematica
8: SymbolicC
◄
previous
|
next
►
Software Development
Symbolically Modify the Syntax Tree
Symbolically manipulate programs by using the syntax tree for transformation. Many transformations are either not easy or impossible using a text find/replace tool.
In[1]:=
X
Needs["SymbolicC`"] CIf[COperator[Less, {i, n}], CAssign[k, 10], CAssign[l, 15]] /. COperator[Less, {arg_, n}] -> COperator[Less, {arg, CStandardMathOperator[Sin, n]}]; ToCCodeString[%]
Out[1]=