| 1 | |
| 2 | <refentry id="return"> |
| 3 | <indexterm id="Indexreturn"><primary>return</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Compilation</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>return</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>return</refname> |
| 11 | <refpurpose> |
| 12 | Returns a value from an instrument. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Return will return a value from an instrument at i-time. The value of a global instrument (instrument 0) can be retrieved |
| 20 | after compilation by the evalstr opcode. The retrieval of values returned by other instruments is not yet implemented. |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis><command>return</command> ival </synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis><quote>ival</quote></emphasis> -- a value to be returned by instrument. |
| 33 | </para> |
| 34 | |
| 35 | </refsect1> |
| 36 | |
| 37 | <refsect1> |
| 38 | <title>Examples</title> |
| 39 | <para> |
| 40 | Here is an example of the return opcode in conjunction with evalcode: |
| 41 | <example> |
| 42 | <para> |
| 43 | <programlisting> |
| 44 | ival <emphasis role="op">evalstr</emphasis> "return 2 + 2" |
| 45 | <emphasis role="op">print</emphasis> ival |
| 46 | </programlisting> |
| 47 | </para> |
| 48 | </example> |
| 49 | </para> |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <title>See Also</title> |
| 54 | <para><link linkend="stringmanipulate"><citetitle></citetitle>String Manipulation Opcodes</link></para> |
| 55 | </refsect1> |
| 56 | |
| 57 | <refsect1> |
| 58 | <title>Credits</title> |
| 59 | <para>Author: &namevictor;, 2013 </para> |
| 60 | </refsect1> |
| 61 | </refentry> |