void i_return_void()
{}
void i_take_no_params()
{}
void foobar()
{
i_take_no_params(i_return_void());
}
Angelscript doesn't support this at the moment, and although it seems a little odd, it does have an occasional use (and is valid in C++). Would it be too much to ask to add this functionality?
Below is why I'm asking. When using ExecuteString it is nice sometimes to be able to catch and view arbitrary return values.
void cmd_execute_test(string& buffer)
{
buffer = "catch(" + buffer + ")";
string output = Execute(buffer);
this->EnqueueOutput(output);
}
void catch() {} // This one does not work
void catch(Data* obj) { dump(obj); }
void catch(bool retval) { this->EnqueueOutput(retval ? "Return: true\r\n" : "Return: false\r\n"); }
void catch(int retval) { this->EnqueueOutput("Return: " + retval + "\r\n"); }
void catch(float retval) { this->EnqueueOutput("Return: " + retval + "\r\n"); }
void catch(string retval) { this->EnqueueOutput("Return: " + retval + "\r\n"); }
Joe