| 1 |
|
| 2 |
<refentry id="strtolk"> |
| 3 |
<indexterm id="Indexstrtolk"><primary>strtolk</primary></indexterm> |
| 4 |
<refentryinfo><title>Strings:Conversion</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>strtolk</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
<refnamediv> |
| 10 |
<refname>strtolk</refname> |
| 11 |
<refpurpose> |
| 12 |
Converts a string to a signed integer (k-rate). |
| 13 |
</refpurpose> |
| 14 |
</refnamediv> |
| 15 |
|
| 16 |
<refsect1> |
| 17 |
<title>Description</title> |
| 18 |
|
| 19 |
<para> Convert a string to a signed integer value at i- or k-rate. It is also possible to pass an strset index or a string p-field from the score instead of a string |
| 20 |
argument. If the string cannot be parsed as an integer number, an init or perf error occurs and the instrument is deactivated. |
| 21 |
|
| 22 |
<note> |
| 23 |
<title>Note</title> |
| 24 |
<para>If a k-rate index variable is used, it should be |
| 25 |
valid at i-time as well. |
| 26 |
</para> |
| 27 |
</note> |
| 28 |
|
| 29 |
</para> |
| 30 |
|
| 31 |
</refsect1> |
| 32 |
|
| 33 |
<refsect1> |
| 34 |
<title>Syntax</title> |
| 35 |
<synopsis>kr <command>strtolk</command> Sstr</synopsis> |
| 36 |
|
| 37 |
<synopsis>kr <command>strtolk</command> kndx</synopsis> |
| 38 |
|
| 39 |
<para> strtolk can parse numbers in decimal, octal (prefixed by 0), and |
| 40 |
hexadecimal (with a prefix of 0x) format.</para> |
| 41 |
|
| 42 |
</refsect1> |
| 43 |
|
| 44 |
|
| 45 |
<refsect1> |
| 46 |
<title>Performance</title> |
| 47 |
<para> |
| 48 |
<emphasis>kr</emphasis> -- Value of string as signed integer. |
| 49 |
</para> |
| 50 |
|
| 51 |
<para> |
| 52 |
<emphasis>Sstr</emphasis> -- String to convert. |
| 53 |
</para> |
| 54 |
|
| 55 |
<para> |
| 56 |
<emphasis>indx</emphasis> -- index of string set by strset |
| 57 |
</para> |
| 58 |
|
| 59 |
</refsect1> |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
<refsect1> |
| 78 |
<title>See Also</title> |
| 79 |
<para><link linkend="stringconvert"><citetitle></citetitle>String Conversion Opcodes</link></para> |
| 80 |
</refsect1> |
| 81 |
|
| 82 |
<refsect1> |
| 83 |
<title>Credits</title> |
| 84 |
<para> |
| 85 |
<simplelist> |
| 86 |
<member>Author: Istvan Varga</member> |
| 87 |
<member>2005</member> |
| 88 |
</simplelist> |
| 89 |
</para> |
| 90 |
</refsect1> |
| 91 |
</refentry> |