Fixed code sample

This commit is contained in:
Matthias Koefferlein 2021-11-13 20:39:49 +01:00
parent be19165140
commit 2831dd7f26
1 changed files with 4 additions and 1 deletions

View File

@ -147,7 +147,10 @@ Class<Interpreter> decl_Macro ("tl", "Interpreter",
"pya = RBA::Interpreter::python_interpreter\n"
"out_param = RBA::Value::new(17)\n"
"pya.define_variable(\"out_param\", out_param)\n"
"pya.eval_string(\"print(\\\"This is Python now!\\\")\\nout_param.value = out_param.value + 25\")\n"
"pya.eval_string(<<END)\n"
"print(\"This is Python now!\")\n"
"out_param.value = out_param.value + 25\n"
"END\n"
"puts out_param.value # gives '42'"
"@/code\n"
"\n"