ReturnExpressionPacket[expr]
is a WSTP packet that contains the expression expr, the result of an EnterExpressionPacket evaluation.
ReturnExpressionPacket
ReturnExpressionPacket[expr]
is a WSTP packet that contains the expression expr, the result of an EnterExpressionPacket evaluation.
Details
- A single EnterExpressionPacket may return multiple ReturnExpressionPacket expressions if a list of box expressions was sent.
- An EnterExpressionPacket might have no corresponding ReturnExpressionPacket if the expression suppresses its output.
- The final ReturnExpressionPacket in a given exchange is typically followed by an InputNamePacket.
Examples
Basic Examples (1)
Launch a subsidiary Wolfram Language kernel process:
link = LinkLaunch[First[$CommandLine] <> " -mathlink"]LinkRead[link]Write the expression 2+2 to the link without evaluating it:
LinkWrite[link, Unevaluated[EnterExpressionPacket[2 + 2]]]The packet in the middle of the list shows the current state:
Table[LinkRead[link], {3}]LinkClose[link]Tech Notes
Related Guides
History
Introduced in 1996 (3.0)
Text
Wolfram Research (1996), ReturnExpressionPacket, Wolfram Language function, https://reference.wolfram.com/language/ref/ReturnExpressionPacket.html.
CMS
Wolfram Language. 1996. "ReturnExpressionPacket." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ReturnExpressionPacket.html.
APA
Wolfram Language. (1996). ReturnExpressionPacket. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ReturnExpressionPacket.html
BibTeX
@misc{reference.wolfram_2026_returnexpressionpacket, author="Wolfram Research", title="{ReturnExpressionPacket}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/ReturnExpressionPacket.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_returnexpressionpacket, organization={Wolfram Research}, title={ReturnExpressionPacket}, year={1996}, url={https://reference.wolfram.com/language/ref/ReturnExpressionPacket.html}, note=[Accessed: 12-June-2026]}