Info file deffn-test-info, produced by Makeinfo, -*- Text -*- from input file texinfo-deffn-test.texinfo.  File: deffn-test-info, Node: Top, Next: Exemplars, Prev: (dir), Up: (dir) Test the `@deffn' constructs **************************** Formatted on: 14 December 1990 Source file: `/gd/gnu/doc/texinfo-deffn-test.texinfo' This file contains test samples of each of the definition commands. Indices are at the end. * Menu: * Exemplars:: Test One of Each * Every:: Every `@deffn' Construct * deftypefun:: `@deftypefun' * Unusual Cases:: * Variable Index:: Variable Index * Function Index:: Function Index  File: deffn-test-info, Node: Exemplars, Next: Every, Prev: Top, Up: Top Test One of Each **************** The first chapter contains one of each of the different kinds of command. There are seven categories to deal with: * Generalized object oriented entitiies, i.e. `@defop', `@defcv'. * Specialized object oriented entities, such as `@defmethod', `@defivar'. * Generalized `regular' entities, i.e. `@deffn', `@defvr'. * Specialized `regular' entities, such as `@defvar', `@defmac'. * Generalized definitions for typed languages, i.e. `@deftypefn', `@deftypevr'. * Specialized definitions for typed languages `regular' entities, such as `@deftypefun' and `@deftypevar'. * Generalized data type, i.e. `@deftp' which is a `gotcha': it should not put what might be considered its `arguments' in upper case. This is because the `arguments' are not necessarily arguments but may be names of aspects of the data type. The canonical example is the dotted-pair in Lisp: @deftp {Data type} dotted-pair car cdr Simple Variables ================ * Variable: variable-name DEFVAR SHOULD BE: Variable: variable-name * Variable-category: variable-name DEFVR SHOULD BE: Variable-category: variable-name Simple Functions ================ * Function: function-name ARGS DEFUN SHOULD BE: Function: function-name ARGS * Function-category: function-name ARGS DEFFN SHOULD BE: Function-category: function-name ARGS Class functions =============== * Method on class: name ARG DEFMETHOD SHOULD BE: Method on class: name ARG * Category on class: name ARG DEFOP SHOULD BE: Category on class: name ARG Class Variables =============== * Instance Variable of class: name DEFIVAR SHOULD BE: Instance Variable of class: name * Category of class: name DEFCV SHOULD BE: Category of class: name Data type ========= * Data type: name aspects DEFTP SHOULD BE: Data type: name aspects Definitions for Typed Languages =============================== * Library Function: int foobar (int FOO, float BAR) DEFTYPEFN SHOULD BE: * Library Function: int foobar (int FOO, float BAR) * Function: int foobar (int FOO, float BAR) DEFTYPEFUN SHOULD BE: * Function: int foobar (int FOO, float BAR)  File: deffn-test-info, Node: Every, Next: deftypefun, Prev: Exemplars, Up: Top Every `@deffn' Construct ************************ The second chapter contains a test for each and every command. * Class Option of Window: border-pattern SHOULD LOOK LIKE * Class Option of Window: border-pattern Test for for @defcv. This is from: @defcv {Class Option} Window border-pattern * Category: name ARGS SHOULD LOOK LIKE * Category: name ARGS Test for @deffn. This is from: @deffn Category name args * Instance Variable of Window: border-pattern SHOULD LOOK LIKE * Instance Variable of Window: border-pattern Test for @defivar. This is from: @defivar Window border-pattern The @defivar command is equivalent to `@defcv {Instance Variable} ...' * Instance Variable of Class-instance-var: name SHOULD BE * Instance Variable of Class-instance-var: name Another test of @defivar. This is from: @defivar Class-instance-var name * Macro: Name ARGS SHOULD LOOK LIKE * Macro: Name ARGS Test for @defmac. This is from: @defmac Name args * Method on bar-class: bar-method ARGUMENT SHOULD LOOK LIKE * Operation on bar-class: bar-method ARGUMENT Test for @defmethod. This is from: @defmethod bar-class bar-method argument Note: the first argument is printed in roman type unless you put it in @code; you should do if it is the name of a class. The @defmethod command is equivalent to `@defop Method ...' and takes three arguments: the name of the class of the method, the name of the method, and its arguments. * Exemplar on foo-class: frobnicate ARGUMENT SHOULD LOOK LIKE * Exemplar on foo-class: frobnicate ARGUMENT Test for @defop. This is from: @defop Exemplar foo-class frobnicate argument * User Option: Option-name SHOULD LOOK LIKE * User Option: Option-name Test for @defopt. This is from: @defopt Option-name The @defopt command is equivalent to `@defvr {User Option} ...'. * Special Form: Name ARGS SHOULD LOOK LIKE * Special form: Name ARGS Test for @defspec. This is from: @defspec Name args The @defspec command is equivalent to `@deffn {Special Form} ...'. * Class: window height width SHOULD LOOK LIKE * Class: window height width Test for @deftp. This is from: @deftp Class window height width Another test for `@deftp': * Data type: dotted-pair car cdr SHOULD LOOK LIKE * Data type: dotted-pair car cdr Test for @deftp. This is from: @deftp {Data type} dotted-pair car cdr * Library Function: int foobar (int FOO, float BAR) SHOULD LOOK LIKE * Library Function: int foobar (int FOO, float BAR) Test for @deftypefn. This is from @deftypefn {Library Function} int foobar (int FOO, float BAR) * Function: int foobar (int FOO, float BAR) SHOULD LOOK LIKE * Function: int foobar (int FOO, float BAR) Test for @deftypefun. This is from @deftypefun int foobar (int FOO, float BAR) * Global Flag: int enable SHOULD LOOK LIKE * Global Flag: int enable Test for @deftypevr. This is from @deftypevr {Global Flag} int enable * Variable: int foobar SHOULD LOOK LIKE * Variable: int foobar Test for @deftypevar. This is from @deftypevr classification type name * Function: Function-name ARGS SHOULD LOOK LIKE * Function: Function-name ARGS Test for @defun. This is from: @defun Function-name args The @defun command is equivalent to `@deffn Function ...'. * Variable: Variable-name SHOULD LOOK LIKE * Variable: Variable-name Test for @defvar. This is from: @defvar Variable-name The @defvar command is equivalent to `@defvr Variable ...'. * Category: name SHOULD LOOK LIKE * Category: name Test for @defvr. This is from: @defvr Category name  File: deffn-test-info, Node: deftypefun, Next: Unusual Cases, Prev: Every, Up: Top `@deftypefun' ************* The `@deftypefn' series of commands are for defining functions and variables in C or any other language with types. For example, @deftypefn {Library Function} int foobar (int FOO, float BAR) produces the following in Info: * Library Function: int foobar (int FOO, float BAR) TEST: * Library Function: int foobar (int FOO, float BAR) ... The template is: @deftypefn classification type name args The specialized definition for typed functions is `@deftypefun'; you don't have to specify the classification: @deftypefun int foobar (int FOO, float BAR) produces the following in Info: * Function: int foobar (int FOO, float BAR) TEST: * Function: int foobar (int FOO, float BAR) ... The template is: @deftypefun DATA TYPE NAME ARGUMENTS... BODY-OF-DESCRIPTION @end deftypefun The general definition command for typed variables is `@deftypevr'; it is used like this: @deftypevr {Global Flag} int enable which produces the following in Info: * Global Flag: int enable TEST: * Global Flag: int enable ... The template is: @deftypevr classification type name The `@deftypevar' command is the specialized definition command for variables in typed languages. The command is equivalent to `@deftypevr Variable ...'. @deftypevar int foobar produces the following in Info: * Variable: int foobar TEST: * Variable: int foobar ... The template is: @deftypevar type name  File: deffn-test-info, Node: Unusual Cases, Next: Variable Index, Prev: deftypefun, Up: Top Unusual Cases ************* * operation on x-graphics-device-type: set-background-color COLOR-NAME * operation on x-graphics-device-type: set-foreground-color COLOR-NAME * operation on x-graphics-device-type: set-border-color COLOR-NAME * operation on x-graphics-device-type: set-mouse-color COLOR-NAME This is a test of @defopx. The four header lines should be indented identically with no blank lines between them or this text. * Procedure: scode/make-lambda NAME REQUIRED OPTIONAL REST AUXILIARY DECLARATIONS BODY This is a test of a long function definition. There are enough arguments to require a continuation line. The continuation line should be indented at twice the indentation of this text.  File: deffn-test-info, Node: Variable Index, Next: Function Index, Prev: Unusual Cases, Up: Top Variable Index ************** * Menu: * Option-name: Every. * Variable-name: Every. * border-pattern: Every. * border-pattern: Every. * enable: deftypefun. * enable: Every. * foobar: Every. * foobar: deftypefun. * name: Exemplars. * name: Every. * name: Every. * name: Exemplars. * variable-name: Exemplars. * variable-name: Exemplars.  File: deffn-test-info, Node: Function Index, Prev: Variable Index, Up: Top Function Index ************** * Menu: * Function-name: Every. * Name: Every. * Name: Every. * bar-method on bar-class: Every. * foobar: Every. * foobar: deftypefun. * foobar: deftypefun. * foobar: Exemplars. * foobar: Every. * foobar: Exemplars. * frobnicate on foo-class: Every. * function-name: Exemplars. * function-name: Exemplars. * name: Every. * name on class: Exemplars. * name on class: Exemplars. * scode/make-lambda: Unusual Cases. * set-background-color on x-graphics-device-type: Unusual Cases. * set-border-color on x-graphics-device-type: Unusual Cases. * set-foreground-color on x-graphics-device-type: Unusual Cases. * set-mouse-color on x-graphics-device-type: Unusual Cases.  Tag Table: Node: Top108 Node: Exemplars718 Node: Every3214 Node: deftypefun7271 Node: Unusual Cases8914 Node: Variable Index9767 Node: Function Index10211  End Tag Table