File: output.html

package info (click to toggle)
libsgmls-perl 1.03ii-38
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 900 kB
  • sloc: perl: 1,387; lisp: 262; makefile: 130
file content (40 lines) | stat: -rw-r--r-- 1,753 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<HTML>
<HEAD>
<TITLE>Why does sgmlspl use output instead of
print?</TITLE>
</HEAD>
<BODY>

<P><B>Links</B>: <A HREF=pushoutput.html>Next</A> <A HREF=specific.html>Previous</A> <A HREF=sgmlspl.html>Up</A> <A HREF=sgmlspl.html>Top</A></P>

<H1>Why does <A HREF=sgmlspl.html><TT>sgmlspl</TT></A> use <TT>output</TT> instead of
<TT>print</TT>?</H1>

<P><A HREF=sgmlspl.html><TT>sgmlspl</TT></A> uses a special <A HREF="http://www.metronet.com/0/perlinfo/perl5/manual/perl.html"><TT>perl5</TT></A> library <A HREF=output.html><TT>SGMLS::Output</TT></A> for
printing text.  <A HREF=output.html><TT>SGMLS::Output</TT></A> exports the subroutines
<TT>output(<IT>string</IT>...)</TT>,
<TT>push_output(<IT>type</IT>[,<IT>data</IT>])</TT>,
and <TT>pop_output</TT>.  The subroutine
<TT>output</TT> works much like the regular <A HREF="http://www.metronet.com/0/perlinfo/perl5/manual/perl.html"><TT>perl5</TT></A> function
<TT>print</TT>, except that you are not able to specify a
file handle, and you may include multiple strings as arguments.</P>

<P>When you want to write data to somewhere other than
<TT>STDOUT</TT> (the default), then you use the subroutines
<A HREF=pushoutput.html><TT>push_output</TT></A> and
<A HREF=popoutput.html><TT>pop_output</TT></A> to set
a new destination or to restore an old one.</P>

<P>You can use the <A HREF=output.html><TT>SGMLS::Output</TT></A> package in other programs by adding
the following line:</P>

<P>
<PRE>use SGMLS::Output;</PRE>
</P>

<P><B>Links</B>: <A HREF=pushoutput.html>Next</A> <A HREF=specific.html>Previous</A> <A HREF=sgmlspl.html>Up</A> <A HREF=sgmlspl.html>Top</A></P>


<ADDRESS>David Megginson <A HREF="mailto:dmeggins@aix1.uottawa.ca">&lt;dmeggins@aix1.uottawa.ca&gt;</A></ADDRESS>
</BODY>
</HTML>