diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2019-06-04 20:49:16 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2019-06-04 20:49:16 -0400 |
commit | 279f17ac0e1b3d019c2b294098e834d249376686 (patch) | |
tree | 47be849d3b35635d167e00cd8448815a75167a23 /manuals/chickadee/Agendas.html | |
parent | 7b808b9268ec735a7a176d10bf1887b3fa66d13e (diff) |
Update chickadee manual.
Diffstat (limited to 'manuals/chickadee/Agendas.html')
-rw-r--r-- | manuals/chickadee/Agendas.html | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/manuals/chickadee/Agendas.html b/manuals/chickadee/Agendas.html index eced92c..3580ade 100644 --- a/manuals/chickadee/Agendas.html +++ b/manuals/chickadee/Agendas.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 David Thompson davet@gnu.org +<!-- Copyright (C) 2017, 2018, 2019 David Thompson davet@gnu.org Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -13,6 +13,8 @@ A copy of the license is also available from the Free Software Foundation Web site at http://www.gnu.org/licenses/fdl.html. +* Chickadee: (chickadee). Game programming toolkit for Guile. + The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> @@ -115,11 +117,12 @@ the current time. This is where <code>after</code> comes in handy: <p>Time units in the agenda are in no way connected to real time. It’s up to the programmer to decide what agenda time means. A simple and -effective approach is to map each call of the update hook +effective approach is to map each call of the update procedure (see <a href="Kernel.html#Kernel">Kernel</a>) to 1 unit of agenda time, like so: </p> <div class="example"> -<pre class="example">(add-hook! update-hook (lambda (dt) (update-agenda 1))) +<pre class="example">(define (update dt) + (update-agenda 1)) </pre></div> <p>It is important to call <code>update-agenda</code> periodically, otherwise @@ -147,19 +150,19 @@ scoped and can be changed using the <code>with-agenda</code> special form: </p></dd></dl> <dl> -<dt><a name="index-agenda_003f"></a>Procedure: <strong>agenda?</strong> <em><var>obj</var></em></dt> +<dt><a name="index-agenda_003f"></a>Procedure: <strong>agenda?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is an agenda. </p></dd></dl> <dl> <dt><a name="index-current_002dagenda"></a>Procedure: <strong>current-agenda</strong></dt> -<dt><a name="index-current_002dagenda-1"></a>Procedure: <strong>current-agenda</strong> <em><var>agenda</var></em></dt> +<dt><a name="index-current_002dagenda-1"></a>Procedure: <strong>current-agenda</strong> <em>agenda</em></dt> <dd><p>When called with no arguments, return the current agenda. When called with one argument, set the current agenda to <var>agenda</var>. </p></dd></dl> <dl> -<dt><a name="index-with_002dagenda"></a>Syntax: <strong>with-agenda</strong> <em><var>agenda</var> <var>body</var> …</em></dt> +<dt><a name="index-with_002dagenda"></a>Syntax: <strong>with-agenda</strong> <em>agenda body …</em></dt> <dd><p>Evaluate <var>body</var> with the current agenda set to <var>agenda</var>. </p></dd></dl> @@ -169,42 +172,42 @@ with one argument, set the current agenda to <var>agenda</var>. </p></dd></dl> <dl> -<dt><a name="index-update_002dagenda"></a>Procedure: <strong>update-agenda</strong> <em><var>dt</var></em></dt> +<dt><a name="index-update_002dagenda"></a>Procedure: <strong>update-agenda</strong> <em>dt</em></dt> <dd><p>Advance the current agenda by <var>dt</var>. </p></dd></dl> <dl> -<dt><a name="index-schedule_002dat"></a>Procedure: <strong>schedule-at</strong> <em><var>time</var> <var>thunk</var></em></dt> +<dt><a name="index-schedule_002dat"></a>Procedure: <strong>schedule-at</strong> <em>time thunk</em></dt> <dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run at <var>time</var>. </p></dd></dl> <dl> -<dt><a name="index-schedule_002dafter"></a>Procedure: <strong>schedule-after</strong> <em><var>delay</var> <var>thunk</var></em></dt> +<dt><a name="index-schedule_002dafter"></a>Procedure: <strong>schedule-after</strong> <em>delay thunk</em></dt> <dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run after <var>delay</var>. </p></dd></dl> <dl> -<dt><a name="index-schedule_002devery"></a>Procedure: <strong>schedule-every</strong> <em><var>interval</var> <var>thunk</var> [<var>n</var>]</em></dt> +<dt><a name="index-schedule_002devery"></a>Procedure: <strong>schedule-every</strong> <em>interval thunk [n]</em></dt> <dd><p>Schedule <var>thunk</var>, a procedure of zero arguments, to be run every <var>interval</var> amount of time. Repeat this <var>n</var> times, or indefinitely if not specified. </p></dd></dl> <dl> -<dt><a name="index-at"></a>Syntax: <strong>at</strong> <em><var>time</var> <var>body</var> …</em></dt> +<dt><a name="index-at"></a>Syntax: <strong>at</strong> <em>time body …</em></dt> <dd><p>Schedule <var>body</var> to be evaluated at <var>time</var>. </p></dd></dl> <dl> -<dt><a name="index-after"></a>Syntax: <strong>after</strong> <em><var>delay</var> <var>body</var> …</em></dt> +<dt><a name="index-after"></a>Syntax: <strong>after</strong> <em>delay body …</em></dt> <dd><p>Schedule <var>body</var> to be evaluated after <var>delay</var>. </p></dd></dl> <dl> -<dt><a name="index-every"></a>Syntax: <strong>every</strong> <em><var>interval</var> <var>body</var> …</em></dt> -<dt><a name="index-every-1"></a>Syntax: <strong>every</strong> <em>(<var>interval</var> <var>n</var>) <var>body</var> …</em></dt> +<dt><a name="index-every"></a>Syntax: <strong>every</strong> <em>interval body …</em></dt> +<dt><a name="index-every-1"></a>Syntax: <strong>every</strong> <em>(interval n) body …</em></dt> <dd><p>Schedule <var>body</var> to be evaluated every <var>interval</var> amount of time. Repeat this <var>n</var> times, or indefinitely if not specified. </p></dd></dl> |