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