LIBCOURSE-NETS(3)

NAME
numbers, integrate, pairs, squares, fibonacci - KRoC course library demo networks

SYNOPSIS
#USE "course.lib"
kroc -lcourse

PROC numbers (CHAN INT out!)
PROC integrate (CHAN INT in?, out!)
PROC pairs (CHAN INT in?, out!)
PROC squares (CHAN INT out!)
PROC fibonacci (CHAN INT out!)

DESCRIPTION

These PROCs provide the demo-networks. They are implemented as networks of sub-processes.

numbers outputs the natural numbers, starting at 0 and incrementing by 1. e.g. 0, 1, 2, 3, 4, ...

integrate implements a simple integrator, with the internal sum initially 0. If the sequence a, b, c is input, then the output will be a, a+b, a+b+c.

pairs adds adjacent pairs of numbers. If the sequence a, b, c is input, then the output will be a+b, b+c.

squares generates a sequence of square numbers, starting from 1. e.g. 1, 4, 9, 16, 25, ... integrate and pairs are used to produce the sequence.

fibonacci generates the fibonacci sequence, starting from 0. e.g. 0, 1, 1, 2, 3, 5, 8, ...

NOTES
These processes are sensitive to arithmetic overflow.

AUTHOR
This manual page is maintained by Fred Barnes <frmb@kent.ac.uk>. The documentation itself was largely extracted from the library sources.

SEE ALSO
kroc(1)
course/libsrc/demo_nets.occ in the KRoC distribution

REPORTING BUGS
Please report bugs to <ofa-bugs@kent.ac.uk>

COPYRIGHT
Copyright © 1984 P.H.Welch

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA