Info Node: (texinfo)Data Types

CFHT HOME texinfo: Data Types


up: Def Cmds in Detail next: Abstract Objects prev: Typed Variables Back to Software Index

16.5.5 Data Types
-----------------

Here is the command for data types:

'@deftp CATEGORY NAME ATTRIBUTES...'
     The '@deftp' command is the generic definition command for data
     types.  The command is written at the beginning of a line and is
     followed on the same line by the category, by the name of the type
     (which is a word like 'int' or 'float'), and then by names of
     attributes of objects of that type.  Thus, you could use this
     command for describing 'int' or 'float', in which case you could
     use 'data type' as the category.  (A data type is a category of
     certain objects for purposes of deciding which operations can be
     performed on them.)

     In Lisp, for example, "pair" names a particular data type, and an
     object of that type has two slots called the CAR and the CDR.  Here
     is how you would write the first line of a definition of 'pair'.

          @deftp {Data type} pair car cdr
          ...
          @end deftp

     The template is:

          @deftp CATEGORY NAME-OF-TYPE ATTRIBUTES...
          BODY-OF-DEFINITION
          @end deftp

     '@deftp' creates an entry in the index of data types.


automatically generated by info2www version 1.2