| 1 | |
| 2 | <refentry id="println"> |
| 3 | <indexterm id="IndexPrintln"><primary>println</primary></indexterm> |
| 4 | <refentryinfo><title>Signal I/O:Printing and Display</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>println</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>printks</refname> |
| 13 | <refpurpose> |
| 14 | Prints at k-rate using a printf() style syntax, appends a new line |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Prints at k-rate using a printf() style syntax. This opcode is similar to printsk, the |
| 22 | only difference being that println appends a new line to each message |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>println</command> "string", [, xval1] [, xval2] [...]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>"string"</emphasis> -- the text string to be printed. Can be up to |
| 35 | 8192 characters and must be in double quotes. |
| 36 | </para> |
| 37 | |
| 38 | </refsect1> |
| 39 | |
| 40 | <refsect1> |
| 41 | <title>Performance</title> |
| 42 | <para> |
| 43 | <emphasis>xval1, xval2, ...</emphasis> (optional) -- The k-rate values to be printed. |
| 44 | These are specified in <emphasis><quote>string</quote></emphasis> with the standard C |
| 45 | value specifier (%f, %d, %s etc.) in the order given. |
| 46 | </para> |
| 47 | |
| 48 | </refsect1> |
| 49 | |
| 50 | <refsect1> |
| 51 | <title>Print Output Formatting</title> |
| 52 | <para> |
| 53 | All standard C language printf() control characters may be used. For example, if <emphasis>kval1</emphasis> = 153.26789 then some common formatting options are: |
| 54 | |
| 55 | <orderedlist> |
| 56 | <listitem><para>%f prints with full precision: 153.26789</para></listitem> |
| 57 | <listitem><para>%5.2f prints: 153.26</para></listitem> |
| 58 | <listitem><para>%d prints integers-only: 153</para></listitem> |
| 59 | <listitem><para>%c treats <emphasis>kval1</emphasis> as an ascii character code. </para></listitem> |
| 60 | </orderedlist> |
| 61 | </para> |
| 62 | |
| 63 | <para> |
| 64 | For more information about printf() formatting, consult any C language documentation. |
| 65 | </para> |
| 66 | |
| 67 | </refsect1> |
| 68 | |
| 69 | <refsect1> |
| 70 | <title>Examples</title> |
| 71 | <para> |
| 72 | Here is an example of the println opcode. It uses the file <ulink |
| 73 | url="examples/println.csd"><citetitle>println.csd</citetitle></ulink>. |
| 74 | |
| 75 | <example> |
| 76 | <title>Example of the println opcode.</title> |
| 77 | <xi:include href="examples-xml/println.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 78 | </example> |
| 79 | </para> |
| 80 | </refsect1> |
| 81 | |
| 82 | <refsect1> |
| 83 | <title>See also</title> |
| 84 | <para><link linkend="SigioPdisplay"><citetitle>Printing and Display</citetitle></link></para> |
| 85 | </refsect1> |
| 86 | |
| 87 | <refsect1> |
| 88 | <title>Credits</title> |
| 89 | <para>By: &nameeduardo; 2020</para> |
| 90 | <para>New plugin in version 6.15</para> |
| 91 | </refsect1> |
| 92 | </refentry> |