Re: Weird use of "recursive" in LRM

From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Mon Mar 11 2002 - 08:51:18 PST


Paul,

I agree with you, but I think the reasoning was like this:
Functions execute in zero time, so the only way you can have more than one function active at the same time is a recursion.

The flaw in this reasoning, as I have pointed out before, is that Section 5 allows a simulator to suspend execution of a function in
the middle, and go off to some other task, which may include another call to the function, before finishing the execution of the
first function call.

Shalom

Paul Graham wrote:

> The definitions of functions and tasks are unnecessarily divergent.
>
> Section 10.2.1 says:
>
> The first syntax shall begin with the keyword task, followed by the
> optional keyword automatic, followed by a name for the task and a
> semicolon, and ending with the keyword endtask. The keyword automatic
> declares an automatic task that is reentrant with all the task
> declarations allocated dynamically for each concurrent task entry.
>
> While section 10.3.1 says:
>
> The keyword automatic declares a recursive function with all the
> function declarations allocated dynamically for each recursive call.
>
> I think 10.3.1 should use "reentrant" instead of "recursive", since just
> declaring a function "automatic" does not make it a recursive function.

--
Shalom Bresticker                           Shalom.Bresticker@motorola.com
Principal Staff Engineer                               Tel: +972 9 9522268
Motorola Semiconductor Israel, Ltd.                    Fax: +972 9 9522890
POB 2208, Herzlia 46120, ISRAEL                       Cell: +972 50 441478


This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:55:35 PDT and
sponsored by Boyd Technology, Inc.