<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>strtol</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="strtodk.html" title="strtodk" /> <link rel="next" href="strtolk.html" title="strtolk" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">strtol</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="strtodk.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="strtolk.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="strtol"></a> <div class="titlepage"></div> <a id="Indexstrtol" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">strtol</span> </h2> <p>strtol — Converts a string to a signed integer (i-rate). </p> </div> <div class="refsect1"> <a id="idm281472883069688"></a> <h2>Description</h2> <p> Convert a string to a signed integer value. It is also possible to pass an strset index or a string p-field from the score instead of a string argument. If the string cannot be parsed as an integer number, an init error occurs and the instrument is deactivated. </p> </div> <div class="refsect1"> <a id="idm281472883012664"></a> <h2>Syntax</h2> <pre class="synopsis">ir <span class="command"><strong>strtol</strong></span> Sstr</pre> <pre class="synopsis">ir <span class="command"><strong>strtol</strong></span> indx</pre> </div> <div class="refsect1"> <a id="idm281472883009176"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>Sstr</em></span> -- String to convert. </p> <p> <span class="emphasis"><em>indx</em></span> -- index of string set by strset </p> <p> strtol can parse numbers in decimal, octal (prefixed by 0), and hexadecimal (with a prefix of 0x) format.</p> </div> <div class="refsect1"> <a id="idm281472883006120"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>ir</em></span> -- Value of string as signed integer. </p> </div> <div class="refsect1"> <a id="idm281472883004328"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Istvan Varga</td> </tr> <tr> <td>2005</td> </tr> </table> <p> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="strtodk.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="strtolk.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">strtodk </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> strtolk</td> </tr> </table> </div> </body> </html>