summaryrefslogtreecommitdiff
path: root/manuals/chickadee/Channels.html
diff options
context:
space:
mode:
Diffstat (limited to 'manuals/chickadee/Channels.html')
-rw-r--r--manuals/chickadee/Channels.html62
1 files changed, 31 insertions, 31 deletions
diff --git a/manuals/chickadee/Channels.html b/manuals/chickadee/Channels.html
index 24c3dba..78f8564 100644
--- a/manuals/chickadee/Channels.html
+++ b/manuals/chickadee/Channels.html
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-<!-- Copyright (C) 2017-2021 David Thompson davet@gnu.org
+<!-- Copyright (C) 2017-2023 David Thompson dthompson2@worcester.edu
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
@@ -17,25 +17,25 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html.
The document was typeset with
http://www.texinfo.org/ (GNU Texinfo).
- -->
-<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
+ -->
+<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Channels (The Chickadee Game Toolkit)</title>
-<meta name="description" content="Channels (The Chickadee Game Toolkit)">
-<meta name="keywords" content="Channels (The Chickadee Game Toolkit)">
-<meta name="resource-type" content="document">
-<meta name="distribution" content="global">
-<meta name="Generator" content="makeinfo">
-<link href="index.html" rel="start" title="Top">
-<link href="Index.html" rel="index" title="Index">
-<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
-<link href="Scripting.html" rel="up" title="Scripting">
-<link href="Data-Structures.html" rel="next" title="Data Structures">
-<link href="Tweening.html" rel="prev" title="Tweening">
+<meta name="description" content="Channels (The Chickadee Game Toolkit)" />
+<meta name="keywords" content="Channels (The Chickadee Game Toolkit)" />
+<meta name="resource-type" content="document" />
+<meta name="distribution" content="global" />
+<meta name="Generator" content="makeinfo" />
+<link href="index.html" rel="start" title="Top" />
+<link href="Index.html" rel="index" title="Index" />
+<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents" />
+<link href="Scripting.html" rel="up" title="Scripting" />
+<link href="Data-Structures.html" rel="next" title="Data Structures" />
+<link href="Tweening.html" rel="prev" title="Tweening" />
<style type="text/css">
-<!--
+&lt;!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
@@ -72,9 +72,9 @@ ul.no-bullet {list-style: none}
}
}
--->
+--&gt;
</style>
-<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css">
+<link rel="stylesheet" type="text/css" href="https://dthompson.us/css/dthompson.css" />
</head>
@@ -84,7 +84,7 @@ ul.no-bullet {list-style: none}
<p>
Previous: <a href="Tweening.html" accesskey="p" rel="prev">Tweening</a>, Up: <a href="Scripting.html" accesskey="u" rel="up">Scripting</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>
-<hr>
+<hr />
<span id="Channels-1"></span><h4 class="subsection">5.5.4 Channels</h4>
<p>Channels are a tool for communicating amongst different scripts. One
@@ -94,18 +94,18 @@ someone on the other end of the line to complete the transaction.
</p>
<p>Here&rsquo;s a simplistic example:
</p>
-<div class="example">
-<pre class="example">(define c (make-channel))
-
-(script
- (forever
- (let ((item (channel-get c)))
- (pk 'got item))))
-
-(script
- (channel-put c 'sword)
- (channel-put c 'shield)
- (channel-put c 'potion))
+<div class="lisp">
+<pre class="lisp"><span class="syntax-open">(</span><span class="syntax-special">define</span> <span class="syntax-symbol">c</span> <span class="syntax-open">(</span><span class="syntax-symbol">make-channel</span><span class="syntax-close">)</span><span class="syntax-close">)</span>
+
+<span class="syntax-open">(</span><span class="syntax-symbol">script</span>
+ <span class="syntax-open">(</span><span class="syntax-symbol">forever</span>
+ <span class="syntax-open">(</span><span class="syntax-special">let</span> <span class="syntax-open">(</span><span class="syntax-open">(</span><span class="syntax-symbol">item</span> <span class="syntax-open">(</span><span class="syntax-symbol">channel-get</span> <span class="syntax-symbol">c</span><span class="syntax-close">)</span><span class="syntax-close">)</span><span class="syntax-close">)</span>
+ <span class="syntax-open">(</span><span class="syntax-symbol">pk</span> <span class="syntax-symbol">'got</span> <span class="syntax-symbol">item</span><span class="syntax-close">)</span><span class="syntax-close">)</span><span class="syntax-close">)</span><span class="syntax-close">)</span>
+
+<span class="syntax-open">(</span><span class="syntax-symbol">script</span>
+ <span class="syntax-open">(</span><span class="syntax-symbol">channel-put</span> <span class="syntax-symbol">c</span> <span class="syntax-symbol">'sword</span><span class="syntax-close">)</span>
+ <span class="syntax-open">(</span><span class="syntax-symbol">channel-put</span> <span class="syntax-symbol">c</span> <span class="syntax-symbol">'shield</span><span class="syntax-close">)</span>
+ <span class="syntax-open">(</span><span class="syntax-symbol">channel-put</span> <span class="syntax-symbol">c</span> <span class="syntax-symbol">'potion</span><span class="syntax-close">)</span><span class="syntax-close">)</span>
</pre></div>
<dl>