evalstr

evalstr — Evalstrs evaluates a string containing Csound code, returning a value.

Description

Evalstr compiles and runs Csound code and returns a value from the global space (instr 0). This opcode can be also used to compile new instruments (as compilestr).

Syntax

ires evalstr Scode 

Initialization

Scode -- a string to be compiled and evaluated.

Examples

Here is an example of the evalstr opcode in conjunction with return:

Example 216. 

ival evalstr "return 2 + 2"
print ival
 


Credits

Author: Victor Lazzarini, 2013