[m-dev.] for review: document pragma import & nondet pragma c_code
David Matthew Overton
dmo at cs.mu.OZ.AU
Thu Nov 5 12:00:38 AEDT 1998
Hi,
On Thu, Nov 05, 1998 at 04:33:39AM EST, Fergus Henderson wrote:
> +
> + at example
> +:- pragma c_code(@var{Pred}(@var{Var1}::@var{Mode1}, @var{Var2}::@var{Mode2}, @dots{}),
> + @var{Attributes}, @var{LocalVars}, @var{FirstCode}, @var{RetryCode},
> + @var{SharedCode}).
> + at end example
Shouldn't the above declaration show the local_vars, first_code, etc,
functors, e.g. s/@var(LocalVars)/local_vars(@var{LocalVars})/ as in
the function declaration below?
> +
> + at noindent
> +or
> +
> + at example
> +:- pragma c_code(@var{Func}(@var{Var1}::@var{Mode1}, @var{Var2}::@var{Mode2}, @dots{}) = (@var{Var}::@var{Mode}),
> + @var{Attributes}, local_vars(@var{LocalVars}), first_code(@var{FirstCode}),
> + retry_code(@var{RetryCode}), shared_code(@var{SharedCode})).
> + at end example
Are nondet/multi functions allowed?
Also, above you have used `shared_code(...)' but in the examples you
use `common_code(...)'.
> +
> + at noindent
> +Here @var{FirstCode}, @var{RetryCode}, and @var{SharedCode} are all Mercury strings
> +containing C code.
> + at var{FirstCode} will be executed whenever the Mercury procedure is called.
> + at var{RetryCode} will be executed whenever a given call to the procedure
> +is re-entered on backtracking to find subsequent solutions.
> +The shared_code(@var{SharedCode}) argument is optional; if present,
> + at var{SharedCode} willl be executed after each execution of
s/willl/will/
--
David Overton Department of Computer Science & Software Engineering
MEngSc Student The University of Melbourne, Australia
More information about the developers
mailing list