is a construct for use inside AskFunction that gives the value associated with key, or Missing[…] if none has been provided.
- If a value has already been associated with a key, AskedValue returns that value just like Ask. But unlike Ask, AskedValue will never request a value from the user, instead returning Missing[…] if no value has yet been provided.
- When no value is yet known for the requested key, AskedValue["key"] returns Missing["NotAsked","key"].
Basic Examples (2)
AskedValue returns the value whenever it is already known:
But returns a Missing object whenever it is not known yet:
AskedValue returns the value without causing a form to be displayed:
Wolfram Research (2016), AskedValue, Wolfram Language function, https://reference.wolfram.com/language/ref/AskedValue.html.
Wolfram Language. 2016. "AskedValue." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AskedValue.html.
Wolfram Language. (2016). AskedValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AskedValue.html