texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * doc/texinfo.texi (Typed Functions): Add output


From: Gavin D. Smith
Subject: branch master updated: * doc/texinfo.texi (Typed Functions): Add output of Ada example and state that @deftypefn does not need to be used with a type, and give R example.
Date: Wed, 10 Aug 2022 16:06:22 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new b6af32786f * doc/texinfo.texi (Typed Functions): Add output of Ada 
example and state that @deftypefn does not need to be used with a type, and 
give R example.
b6af32786f is described below

commit b6af32786f7e525144f904bb03906d4804bc3ea3
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Aug 10 21:06:12 2022 +0100

    * doc/texinfo.texi (Typed Functions): Add output of Ada example and
    state that @deftypefn does not need to be used with a type, and give
    R example.
---
 ChangeLog        | 10 ++++++++--
 doc/texinfo.texi | 37 ++++++++++++++++++++++++++++++++++++-
 2 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9c6b25ccb3..85c4e1a350 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2022-08-09  Gavin Smith  <gavinsmith0123@gmail.com>
+2022-08-10  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * doc/texinfo.texi (Typed Functions): Add output of Ada example and
+       state that @deftypefn does not need to be used with a type, and give
+       R example.
+
+2022-08-10  Gavin Smith  <gavinsmith0123@gmail.com>
 
        Avoid extra space after punctuation in \texttt
 
@@ -6,7 +12,7 @@
        Where punctuation appears before a space, change the
        space to "\ ", control space.
 
-2022-08-09  Gavin Smith  <gavinsmith0123@gmail.com>
+2022-08-10  Gavin Smith  <gavinsmith0123@gmail.com>
 
        No special output for @t in def args
 
diff --git a/doc/texinfo.texi b/doc/texinfo.texi
index b986302e9b..0309ed89df 100644
--- a/doc/texinfo.texi
+++ b/doc/texinfo.texi
@@ -11903,7 +11903,42 @@ single line.)
 In this instance, the procedure is classified as belonging to the
 package @code{stacks} rather than classified as a `procedure' and its
 data type is described as @code{private}.  (The name of the procedure
-is @code{push}, and its arguments are @var{s} and @var{n}.)
+is @code{push}, and its arguments are @var{s} and @var{n}.)  Output:
+
+@deftypefn stacks private push @
+       (@var{s}:in out stack; @
+       @var{n}:in integer)
+@dots{}
+@end deftypefn
+
+@code{@@deftypefn} and variants could be used when it is convenient to
+interpret the arguments list as literal computer code, marking
+argument names with @code{@@var}.
+It is not necessary for any type names to appear,
+and you can give an empty return type as @samp{@{@}}.  For
+example, for documenting the R language, you could use input like
+
+@example
+@@deftypefn stats @{@} t.test (@@var@{x@}, @@var@{y@} = NULL,@@
+  @@w@{@@var@{alternative@} = c("two.sided", "less", "greater")@},@@
+  @@w@{@@var@{mu@} = 0@}, @@w@{@@var@{paired@} = FALSE@},@@
+  @@w@{@@var@{var.equal@} = FALSE@},@@
+  @@w@{@@var@{conf.level@} = 0.95@}, @@dots@{@})
+@dots{}
+@@end deftypefn
+@end example
+
+@noindent to get output like
+
+@deftypefn stats {} t.test (@var{x}, @var{y} = NULL,@
+  @w{@var{alternative} = c("two.sided", "less", "greater")},@
+  @w{@var{mu} = 0}, @w{@var{paired} = FALSE},@
+  @w{@var{var.equal} = FALSE},@
+  @w{@var{conf.level} = 0.95}, @dots{})
+@dots{}
+@end deftypefn
+
+@noindent Here the @code{@@w} command is used to prevent some line breaks.
 
 @code{@@deftypefn} creates an entry in the index of functions for
 @var{name}.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]