<head><title>ColdC: Function/Method Reference: replace()</title></head> <body> <h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: replace()</h1> <hr> <p> <font size=+1><i>LIST</i> <b>replace</b>(<i>LIST <b>list</b>, INTEGER <b>pos</b>, ANY <b>value</b></i>)</font> <p>This function replaces the element in <var>list</var> specified by <var>pos</var> with <var>value</var>. If <VAR>pos</VAR> is less than one or is greater than the length of <VAR>list</VAR>, the error <code>~range</code> is thrown. <p>Example: <blockquote><PRE> replace([2, 3, 4], 2, 'foo) => [2, 'foo, 4] </PRE></blockquote> <p><hr size=4><p align=center><i>Last Modified on 24 Mar 1996</i> <br><i>Copyright © 1995, 1996, Brandon Gillespie</i> </body>