Following an <Instruction>
having set the <State>
’s
last_instruction_effect
to
(MUST_PROMPT_COMMAND <IntValue> <IntValue> <TextValue>)
,
(MUST_PROMPT_INTEGER <IntValue> <IntValue> <TextValue>)
,
(MUST_PROMPT_FLOAT <FloatValue> <FloatValue> <TextValue>)
,
(MUST_PROMPT_STRING <IntValue> <IntValue> <TextValue>)
,
or (MUST_INPUT_CHOICE)
, it is necessary
for the user to provide an input prior to further <Instruction>
s being
executed. The information provided in the <InstructionResult>
is expected
to be sufficient for the interpreter to ensure the user input is valid.
Providing invalid inputs to the <State>
will result in undefined (and most
likely problematic) behaviors.
Thus, the <State>
should expect to accept the following types of inputs:
{Integer}
prompt answerThis follows a
(MUST_PROMPT_INTEGER <IntValue> <IntValue> <TextValue>)
<InstructionResult>
.
<State>
’s memorized_target
as a
<PointerValue>
address.<Value>
pointed to by this address in the <State>
’s memory
so that it becomes an <IntValue>
corresponding to the user’s input.<State>
’s last_instruction_effect
to (MUST_CONTINUE)
.{Float}
prompt answerThis follows a
(MUST_PROMPT_FLOAT <FloatValue> <FloatValue> <TextValue>)
<InstructionResult>
.
<State>
’s memorized_target
as a
<PointerValue>
address.<Value>
pointed to by this address in the <State>
’s memory
so that it becomes an <FloatValue>
corresponding to the user’s input.<State>
’s last_instruction_effect
to (MUST_CONTINUE)
.{String}
prompt answerThis follows a
(MUST_PROMPT_STRING <IntValue> <IntValue> <TextValue>)
<InstructionResult>
.
<State>
’s memorized_target
as a
<PointerValue>
address.<Value>
pointed to by this address in the <State>
’s memory
so that it becomes an <StringValue>
corresponding to the user’s input.<State>
’s last_instruction_effect
to (MUST_CONTINUE)
.{{String} List}
prompt answerThis follows a
(MUST_PROMPT_COMMAND <IntValue> <IntValue> <TextValue>)
<InstructionResult>
.
<State>
’s memorized_target
as a
<PointerValue>
address.<ListValue>
: For each element of value
{s: String}
and index {i: Integer}
, the <ListValue>
contains
{{c_i: String} -> <c_s: StringValue>}
where c_i
is a {String}
corresponding to i
and c_s
a <StringValue>
corresponding to s
.<Value>
pointed to by this address in the <State>
’s memory
so that it becomes the aforementioned <ListValue>
.<State>
’s last_instruction_effect
to (MUST_CONTINUE)
.{Integer}
choice answerThis follows a (MUST_INPUT_CHOICE)
<InstructionResult>
.
<State>
’s last_choice_index
to the input {Integer}
.<State>
’s available_options
list.<State>
’s last_instruction_effect
to (MUST_CONTINUE)
.