generate C code for an expression - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : MTM Package : MTM/ccode

MTM[ccode] - generate C code for an expression

Calling Sequence

ccode(A)

ccode(A,x)

Parameters

A

-

expression, Array, Matrix, or Vector of expressions

x

-

(optional) string

Description

• 

The ccode(A,x) function creates a C statement which represents the assignment of the expression A to the variable x.  This C statement is returned as a string.

• 

When called with the form ccode(A), the expression A is assigned to a default variable name in the returned statement.

Examples

withMTM:

ccodex45x2+2,'w'

w = pow(x, 0.4e1) - 0.5e1 * x * x + 0.2e1;

(1)

See Also

CodeGeneration[C], MTM[fortran]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam