evalstr
Prev | Orchestra Opcodes and Operators | Next

## 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

    kres evalstr Scode, ktrig

## Initialization

“Scode” -- a string to be compiled and evaluated.

## Performance

“ktrig” -- triggers the compilation/evaluation if non-zero.

## Examples

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

Example 266.

    ival evalstr "return 2 + 2"
    print ival

## Credits

Author: Victor Lazzarini, 2013

Prev | Up | Next
eqfil | Home | event