Delayed

Delayed[expr]

represents an expression whose evaluation is delayed until its value is externally requested.

Delayed[expr,fmt]

specifies that the result from evaluating expr should be given in format fmt.

Delayed[expr,{fmt,rform}]

specifies that the result should be given as a response of the form rform.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Delayed specifies that the expression should not be evaluated until it is requested:

This link gives the current time. Revisiting the link gives the new time:

Options  (2)

CachePersistence  (1)

Deploy a Delayed that gives the current time and caches its result for up to 3 seconds:

UpdateInterval  (1)

Deploy a Delayed that refreshes every 3 seconds when displayed in a web browser:

Possible Issues  (1)

Since the default ExportForm of Delayed[expr] is HTMLFragment, an expression evaluating to None will be returned as an empty string:

In order to get the correct value in the above example, specify the format of Delayed[expr] as Wolfram Language:

Wolfram Research (2014), Delayed, Wolfram Language function, https://reference.wolfram.com/language/ref/Delayed.html (updated 2014).

Text

Wolfram Research (2014), Delayed, Wolfram Language function, https://reference.wolfram.com/language/ref/Delayed.html (updated 2014).

CMS

Wolfram Language. 2014. "Delayed." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Delayed.html.

APA

Wolfram Language. (2014). Delayed. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Delayed.html

BibTeX

@misc{reference.wolfram_2024_delayed, author="Wolfram Research", title="{Delayed}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Delayed.html}", note=[Accessed: 11-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_delayed, organization={Wolfram Research}, title={Delayed}, year={2014}, url={https://reference.wolfram.com/language/ref/Delayed.html}, note=[Accessed: 11-December-2024 ]}