AskAppend

AskAppend["key"]

is a construct for use inside AskFunction that asks for a new value, appends it to the current value associated with "key", and returns the resulting list.

AskAppend["key"formspec]

uses formspec to define how input should be requested and interpreted.

Details

  • If there is no value yet associated with "key", AskAppend will put the new value it obtains in a list.
  • Executing AskAppend again with the same key will append each new value to the list associated with the key.
  • If there is an existing value associated with "key" that was obtained from Ask, AskAppend will put this value in a list before appending a new value.

Examples

open allclose all

Basic Examples  (2)

Ask a question several times, appending each answer to a list:

Use AskAppend to accumulate inputs:

Properties & Relations  (2)

Using Ask before AskAppend will result in the first answer being wrapped in a list before appending the result:

Using Ask after AskAppend will result in the currently known list of values being returned without a form being presented:

Wolfram Research (2016), AskAppend, Wolfram Language function, https://reference.wolfram.com/language/ref/AskAppend.html.

Text

Wolfram Research (2016), AskAppend, Wolfram Language function, https://reference.wolfram.com/language/ref/AskAppend.html.

BibTeX

@misc{reference.wolfram_2021_askappend, author="Wolfram Research", title="{AskAppend}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/AskAppend.html}", note=[Accessed: 31-July-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_askappend, organization={Wolfram Research}, title={AskAppend}, year={2016}, url={https://reference.wolfram.com/language/ref/AskAppend.html}, note=[Accessed: 31-July-2021 ]}

CMS

Wolfram Language. 2016. "AskAppend." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AskAppend.html.

APA

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