<< Add SYMSCI Toolbox Det >>

SYMSCI Toolbox >> SYMSCI Toolbox > Assign

Assign

(:) symbolic assign operator

Calling Sequence

Assign( a, b )
a: b

Arguments

a

symbolic variable

b

symbolic object, string, double, or integer

Description

Assigns the value of b to an existing symbolic variable a and returns the modified variable a.

Examples

// create some symbolic variables
a = %(Sym("a"));
b = %(Sym("b"));
c = %(Sym("c"));
d = %(Sym("d"));

// assign a double "1.23" to "a"
a: 1.23;

// assign an integer "17" to "b"
b: int32(17);

// assign the value of "a" to "c"
c: a;

// change symbol name of "d" to "x"
d: "x";

// what do you expect?
a
b
c
d

// ok, let's finally clean up ...
free(a); free(b); free(c); free(d);
clear a b c d

See Also

Authors

Bibliography

SymEngine: C++ library for fast symbolic manipulation.


Report an issue
<< Add SYMSCI Toolbox Det >>