New in Wolfram
Mathematica
8: SymbolicC
◄
previous
|
next
►
Software Development
Understanding of Precedence
By having an understanding of C precedence rules, the code generator can decrease the number of parentheses in the program.
In[1]:=
X
Needs["SymbolicC`"] letters = CharacterRange["a", "z"]; Nest[COperator[ RandomChoice[{Plus, Minus, Times, Divide}], {#, RandomChoice[letters]}] &, 1, 50] // ToCCodeString
Out[1]=