Commit 69cb3443 authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed no return value for main algorithm

parent 7700a0f1
......@@ -218,6 +218,8 @@ bool Run::makeInputArgument(Variable & reference)
}
bool Run::makeOutputArgument(const Variable & reference) {
if (!reference.isValid())
return true;
QString repr;
emit output(QString::fromStdWString(reference.name())+" = ");
if (reference.dimension()==0) {
......
......@@ -2048,6 +2048,8 @@ void KumirVM::do_store(uint8_t s, uint16_t id)
if (m_externalHandler)
m_externalHandler->noticeOnValueChange(lineNo, qn);
}
if (stack_contexts.top().type==Bytecode::EL_BELOWMAIN)
Variable::unsetError();
s_error = Kumir::Core::getError();
nextIP();
if (m_dontTouchMe) m_dontTouchMe->unlock();
......
......@@ -226,6 +226,8 @@ bool InteractionHandler::makeInputArgument(VM::Variable &reference)
}
bool InteractionHandler::makeOutputArgument(const VM::Variable & reference) {
if (!reference.isValid())
return true;
Kumir::String repr;
output(reference.name()+Kumir::Core::fromAscii(" = "));
if (reference.dimension()==0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment