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
- Delayed is typically used with CloudDeploy to create a web page whose content is updated whenever the page is requested.
- The following options can be given:
-
AllowedCloudExtraParameters None what overall parameters to allow to be specified CachePersistence 0 how long to maintain a cache of results UpdateInterval Infinity how often a browser should request an update - With the option UpdateIntervalt, Delayed specifies that a web page should be updated in the web browser every t seconds when it is displayed.
- The option AllowedCloudExtraParameters specifies what additional query parameters governing evaluation of expr should be allowed.
- Possible result formats fmt in Delayed[expr,fmt] are:
-
"fmt" any format supported by ExportForm fun an arbitrary function to be applied to expr - Delayed[expr,"fmt"] is equivalent to Delayed[ExportForm[expr,"fmt"]].
- Delayed is also used to control the resource copying behavior of cloud functions such as DocumentGenerator. Files and cloud objects qualified as Delayed are used in place.
Examples
open allclose allBasic 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)
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:
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