CAssign
CAssign[lhs,rhs]
is a symbolic representation of an assignment statement.
Details and Options
- SymbolicC expressions are inert; they evaluate to themselves, staying in an unevaluated form.
- SymbolicC expressions can be converted into a C string with ToCCodeString.
- The right-hand side of the assignment can be a list. This is useful for initializing an array.
Examples
Basic Examples (1)Summary of the most common use cases
To use SymbolicC you first need to load the package:
https://wolfram.com/xid/0dqdlbxb9ozwxwq-flbge2
https://wolfram.com/xid/0dqdlbxb9ozwxwq-dub8bo
This assigns the location pointed to by pt to 10:
https://wolfram.com/xid/0dqdlbxb9ozwxwq-t1x93
This declares a variable and assigns it:
https://wolfram.com/xid/0dqdlbxb9ozwxwq-di0uqw
https://wolfram.com/xid/0dqdlbxb9ozwxwq-oytot
You can use different operators. This adds 5 to a and assigns the result in a:
https://wolfram.com/xid/0dqdlbxb9ozwxwq-ekzl7
You can give a list of right-hand values. This is useful for initializing an array:
https://wolfram.com/xid/0dqdlbxb9ozwxwq-5jym0
Wolfram Research (2010), CAssign, Wolfram Language function, https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html.
Text
Wolfram Research (2010), CAssign, Wolfram Language function, https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html.
Wolfram Research (2010), CAssign, Wolfram Language function, https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html.
CMS
Wolfram Language. 2010. "CAssign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html.
Wolfram Language. 2010. "CAssign." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html.
APA
Wolfram Language. (2010). CAssign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html
Wolfram Language. (2010). CAssign. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html
BibTeX
@misc{reference.wolfram_2024_cassign, author="Wolfram Research", title="{CAssign}", year="2010", howpublished="\url{https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html}", note=[Accessed: 13-January-2025
]}
BibLaTeX
@online{reference.wolfram_2024_cassign, organization={Wolfram Research}, title={CAssign}, year={2010}, url={https://reference.wolfram.com/language/SymbolicC/ref/CAssign.html}, note=[Accessed: 13-January-2025
]}