home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / modu1096.zip / GPMsym / types.def < prev    next >
Text File  |  1996-10-10  |  3KB  |  87 lines

  1. (*
  2.  * =========== macro processed output from MPP  ==========
  3.  *
  4.  * input file  : types.dpp
  5.  * time stamp  : 1996 Aug 29 12:52:07
  6.  *
  7.  * output file : types.def
  8.  * created at  : 1996 Oct 10 16:21:31
  9.  *
  10.  * options ... :  -Dos2
  11.  *
  12.  * =======================================================
  13.  *)
  14.  
  15. (****************************************************************)
  16. (*                                                              *)
  17. (*         Gardens Point Modula-2 Library Definition            *)
  18. (*                                                              *)
  19. (*                                                              *)
  20. (*     (c) Copyright 1996 Faculty of Information Technology     *)
  21. (*              Queensland University of Technology             *)
  22. (*                                                              *)
  23. (*     Permission is granted to use, copy and change this       *)
  24. (*     program as long as the copyright message is left intact  *)
  25. (*                                                              *)
  26. (****************************************************************)
  27.  
  28. DEFINITION MODULE Types;
  29.  
  30.   (*******************************************************)
  31.   (* this module supplies some traditional identifiers     *)
  32.   (* subranges occupy as much storage space as needed     *)
  33.   (*******************************************************)
  34.   (* NOTE:  On 32 bit platforms (non Alpha) Int32/Card32 *)
  35.   (*        are aliases for INTEGER/CARDINAL         *)
  36.   (*******************************************************)
  37.   
  38.  
  39.   (* Type Mapping Table
  40.    * ==================
  41.    *                                    Size
  42.    *     Data Type         Alpha        Unix       PC
  43.    *     ---------------+-----------+-----------+-----------+
  44.    *     short int      |    16     |     16    |      8    |
  45.    *     short unsigned |    16     |     16    |      8    |
  46.    *                    |           |           |           |
  47.    *     int            |    32     |     32    |     16    |
  48.    *     unsigned int   |    32     |     32    |     16    |
  49.    *                    |           |           |           |
  50.    *     long int       |    64     |     32    |     32    |  
  51.    *     unsigned long  |    64     |     32    |     32    |
  52.    *     ---------------+-----------+-----------+-----------+
  53.    *)
  54.  
  55. TYPE 
  56.     (* Signed Types - Integers    *)    (* "c" type mapping      *)
  57.     (* --------------------------------------------------------- *) 
  58.  
  59.     Int8     = [-128 .. 127];        (* => signed char        *)
  60.     Int16    = [-32768 .. 32767];    (* => short int          *)
  61.     Int32    = INTEGER;                 (* rather than subrange  *)
  62.     LONGINT  = INTEGER;                 (* => long int           *)
  63.  
  64.  
  65.     (* Unsigned Types - Cardinals *)    (* "c" type mapping      *)
  66.     (* --------------------------------------------------------- *)
  67.  
  68.     Card8    = [0 .. 255];        (* => unsigned char      *)
  69.     Card16   = [0 .. 65535];        (* => short unsigned int *)
  70.     Card32   = CARDINAL;                (* rather than subrange  *)
  71.     LONGCARD = CARDINAL;                (* => unsigned long int  *)
  72.  
  73.  
  74.     (* Alternative Type Names    *)
  75.     (* ----------------------    *)
  76.  
  77.     BYTEINT   = Int8;
  78.     BYTECARD  = Card8;
  79.  
  80.     SHORTINT  = Int16;
  81.     SHORTCARD = Card16;
  82.  
  83.     MIDINT    = Int32;
  84.     MIDCARD   = Card32;
  85.  
  86. END Types.
  87.