13 lines
428 B
C++
13 lines
428 B
C++
|
#include "scratchApi.h"
|
||
|
|
||
|
ReturnValue_t scratch::writeString(std::string name, std::string string) {
|
||
|
std::ostringstream oss;
|
||
|
oss << "xsc_scratch write " << name << " \"" << string << "\"";
|
||
|
int result = std::system(oss.str().c_str());
|
||
|
if(result != 0) {
|
||
|
utility::handleSystemError(result, "scratch::String");
|
||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||
|
}
|
||
|
return HasReturnvaluesIF::RETURN_OK;
|
||
|
}
|