summaryrefslogtreecommitdiffstats
path: root/doc/queue.n
diff options
context:
space:
mode:
authorericm <ericm>2000-02-05 03:20:20 (GMT)
committerericm <ericm>2000-02-05 03:20:20 (GMT)
commit09aefc91245d7700c0adc862b3bd105875776920 (patch)
tree71645d413988b58fe7d4461a547d16e1a7d92381 /doc/queue.n
parent8bf5f65362060f021f96b45b48a62d9183deabb1 (diff)
downloadtcl-09aefc91245d7700c0adc862b3bd105875776920.zip
tcl-09aefc91245d7700c0adc862b3bd105875776920.tar.gz
tcl-09aefc91245d7700c0adc862b3bd105875776920.tar.bz2
* doc/tree.n:
* doc/stack.n: * doc/queue.n: docs for tree, stack, and queue. * win/Makefile.in: * unix/Makefile.in: Added struct1.0 to list of libraries to install. * tests/stackstruct.test: stack tests * tests/queue.test: queue tests * library/struct1.0/queue.tcl: queue data structure. * library/struct1.0/stack.tcl: stack data structure. * library/struct1.0/pkgIndex.tcl: * library/struct1.0/struct.tcl: data structure package
Diffstat (limited to 'doc/queue.n')
-rw-r--r--doc/queue.n62
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/queue.n b/doc/queue.n
new file mode 100644
index 0000000..7becec7
--- /dev/null
+++ b/doc/queue.n
@@ -0,0 +1,62 @@
+'\"
+'\" Copyright (c) 1998-2000 by Scriptics Corporation.
+'\" All rights reserved.
+'\"
+'\" RCS: @(#) $Id: queue.n,v 1.1 2000/02/05 03:20:20 ericm Exp $
+'\"
+.so man.macros
+.TH queue n 8.3 Tcl "Tcl Built-In Commands"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+::struct::queue \- Create and manipulate queue objects
+.SH SYNOPSIS
+\fBpackage require struct ?1.0?\fR
+.sp
+\fB::struct::queue\fR \fIqueueName\fR
+.sp
+.BE
+.SH DESCRIPTION
+.PP
+The \fB::struct::queue\fR command creates a new queue object with an
+associated global Tcl command whose name is \fIqueueName\fR. This command
+may be used to invoke various operations on the queue. It has the
+following general form:
+.CS
+\fIqueueName option \fR?\fIarg arg ...\fR?
+.CE
+\fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for queue objects:
+.TP
+\fIqueueName \fBclear\fR
+Remove all items from the queue.
+.TP
+\fIqueueName \fBdestroy\fR
+Destroy the queue, including its storage space and associated command.
+.TP
+\fIqueueName \fBget\fR ?\fIcount\fR?
+Return the front \fIcount\fR items of the queue and remove them
+from the queue. If \fIcount\fR is not specified, it defaults to 1.
+If \fIcount\fR is 1, the result is a simple string; otherwise, it is a list.
+If specified, \fIcount\fR must be greater than or equal to 1. If
+there are no items in the queue, this command will return \fIcount\fR
+empty strings.
+.TP
+\fIqueueName \fBpeek\fR ?\fIcount\fR?
+Return the front \fIcount\fR items of the queue, without removing them
+from the queue. If \fIcount\fR is not specified, it defaults to 1.
+If \fIcount\fR is 1, the result is a simple string; otherwise, it is a list.
+If specified, \fIcount\fR must be greater than or equal to 1. If
+there are no items in the queue, this command will return \fIcount\fR
+empty strings.
+.TP
+\fIqueueName \fBput\fR \fIitem\fR ?\fIitem ...\fR?
+Put the item or items specified into the queue. If more than one
+item is given, they will be added in the order they are listed.
+.TP
+\fIqueueName \fBsize\fR
+Return the number of items in the queue.
+
+.SH KEYWORDS
+stack, queue