<!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> <title>Parrot - I/O Opcodes</title> <link rel="stylesheet" type="text/css" href="../../../resources/parrot.css" media="all"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="wrapper"> <div id="header"> <a href="http://www.parrot.org"> <img border=0 src="../../../resources/parrot_logo.png" id="logo" alt="parrot"> </a> </div> <!-- "header" --> <div id="divider"></div> <div id="mainbody"> <div id="breadcrumb"> <a href="../../../html/index.html">Home</a> » <a href="../../../html/ops.html">Opcodes</a> » I/O Opcodes </div> <h1><a name="NAME" >NAME</a></h1> <p>io.ops - I/O Opcodes</p> <h1><a name="DESCRIPTION" >DESCRIPTION</a></h1> <p>Parrot's IO API</p> <p>When making changes to any ops file, run <code>make bootstrap-ops</code> to regenerate all generated ops files.</p> <h2><a name="Parrot_IO_API_Operations" >Parrot IO API Operations</a></h2> <dl> <dt><a name="print(in_INT)" ><b>print</b>(in INT)</a></dt> <dt><a name="print(in_NUM)" ><b>print</b>(in NUM)</a></dt> <dt><a name="print(invar_PMC)" ><b>print</b>(invar PMC)</a></dt> <dt><a name="print(in_STR)" ><b>print</b>(in STR)</a></dt> Print $1 to standard output. <dt><a name="say(in_INT)" ><b>say</b>(in INT)</a></dt> <dt><a name="say(in_NUM)" ><b>say</b>(in NUM)</a></dt> <dt><a name="say(invar_PMC)" ><b>say</b>(invar PMC)</a></dt> <dt><a name="say(in_STR)" ><b>say</b>(in STR)</a></dt> Print $1 to standard output with a trailing newline. <dt><a name="print(invar_PMC,_in_INT)" ><b>print</b>(invar PMC, in INT)</a></dt> <dt><a name="print(invar_PMC,_in_NUM)" ><b>print</b>(invar PMC, in NUM)</a></dt> <dt><a name="print(invar_PMC,_in_STR)" ><b>print</b>(invar PMC, in STR)</a></dt> <dt><a name="print(invar_PMC,_invar_PMC)" ><b>print</b>(invar PMC, invar PMC)</a></dt> Print $2 on the IO stream object $1. <dt><a name="getstdin(out_PMC)" ><b>getstdin</b>(out PMC)</a></dt> Create a new ParrotIO object for the stdin file descriptor and store it in $1 <dt><a name="getstdout(out_PMC)" ><b>getstdout</b>(out PMC)</a></dt> Create a new ParrotIO object for the stdout file descriptor and store it in $1 <dt><a name="getstderr(out_PMC)" ><b>getstderr</b>(out PMC)</a></dt> Create a new ParrotIO object for the stderr file descriptor and store it in $1</dl> </div> <!-- "mainbody" --> <div id="divider"></div> <div id="footer"> Copyright © 2002-2011, Parrot Foundation. </div> </div> <!-- "wrapper" --> </body> </html>