<?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>strtodk</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="strtod.html" title="strtod" /> <link rel="next" href="strtol.html" title="strtol" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">strtodk</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="strtod.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="strtol.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="strtodk"></a> <div class="titlepage"></div> <a id="Indexstrtodk" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">strtodk</span> </h2> <p>strtodk — Converts a string to a float (k-rate). </p> </div> <div class="refsect1"> <a id="idm281472883107400"></a> <h2>Description</h2> <p> Convert a string to a floating point 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 argument. If the string cannot be parsed as a floating point or integer number, an init or perf error occurs and the instrument is deactivated. </p> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note: Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p>If a k-rate index variable is used, it should be valid at i-time as well. </p> </td> </tr> </table> </div> <p> </p> </div> <div class="refsect1"> <a id="idm281472883049080"></a> <h2>Syntax</h2> <pre class="synopsis">kr <span class="command"><strong>strtodk</strong></span> Sstr</pre> <pre class="synopsis">kr <span class="command"><strong>strtodk</strong></span> kndx</pre> </div> <div class="refsect1"> <a id="idm281472883045416"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kr</em></span> -- Value of string as float. </p> <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> </div> <div class="refsect1"> <a id="idm281472883040776"></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="strtod.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="strtol.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">strtod </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> strtol</td> </tr> </table> </div> </body> </html>