home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Aktief 1995 #3 / CDA3.iso / clipper / strong.ch < prev    next >
Text File  |  1994-10-17  |  4KB  |  86 lines

  1. /*
  2.   ███████████████████████████Strong.ch V1.0██████████████████████████████
  3.   │┌┬┬┬┬┬┬┬┬┬┐                                                         │░
  4.   │├┼┼┼┼ ┼┼┼┼┤ Description: #INCLUDE this file for strong type support │░
  5.   │├┼┼┼ █ ┼┼┼┤              within CA-Clipper PRG files.               │░
  6.   │├┼┼  █  ┼┼┤                                                         │░
  7.   │├┼   █   ┼┤                                                         │░
  8.   │├    ■    ┤ Author     : Marc Gagnon (c) 1994 [CIS 71175,437]       │░
  9.   │└┴┴┴┴┴┴┴┴┴┘                                                         │░
  10.   └────────────────────────────────────────────────────────────────────┘░
  11.     ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  12.  
  13. Syntax:
  14.  
  15.       [STATIC] FUNCTION <idFunction>[ ( [ <idParameter> [AS|REF <idType>] ]
  16.                                         [,...]
  17.                                       )
  18.                                     ] [ AS <idType> [ <idConvention> ] ]
  19.                                       [ EXPORT LOCAL ]
  20.  
  21.         LOCAL  <idVariable> [,...] [ AS <idType> ]
  22.         STATIC <idVariable> [,...] [ AS <idType> ]
  23.  
  24. Arguements:
  25.  
  26.         <idType> is any of the following strong types supported in VO.  For
  27.                 undetermined types use the "USUAL" type.  This strong typing
  28.                 can be used for formal parameter typing, function typing,
  29.                 and local & static variable typing.
  30.  
  31.                 ARRAY      DWORD      LONGINT    REAL4      SYMBOL
  32.                 BYTE       FLOAT      OBJECT     REAL8      USUAL
  33.                 CODEBLOCK  INT        PSZ        SHORTINT   WORD
  34.                 DATE       LOGIC      PTR        STRING
  35.  
  36.  
  37.         <idConvention> is the function calling convention to be used
  38.                        mainly for parameter passing and return value
  39.                        handling.  Can be any of the following:
  40.  
  41.                    CLIPPER, STRICT, PASCAL, CALLBACK
  42.  
  43. Notes:
  44.  
  45.         *To limit the number of preprocessor directives (i.e:memory
  46.          and compile time savings), I implemented strong type support
  47.          with "xTRANSLATE" in a very basic manner.
  48.  
  49.          The programmer must place the AS <idType> clause in the proper
  50.          places (parameters, locals, statics and functions).  If placed
  51.          anywhere else (in expressions or other commands) the AS <idType>
  52.          clause will be accepted and simply nullified.
  53.  
  54.          A compile time error will occur when a non-supported <idType> or
  55.          <idConvention> is specified.
  56.  
  57. */
  58.  
  59.  
  60. //-----------------------------------------------------------------------
  61. #xTRANSLATE AS <idType:ARRAY,                                           ;
  62.                        BYTE,                                            ;
  63.                        CODEBLOCK,                                       ;
  64.                        DATE,                                            ;
  65.                        DWORD,                                           ;
  66.                        FLOAT,                                           ;
  67.                        INT,                                             ;
  68.                        LOGIC,                                           ;
  69.                        LONGINT,                                         ;
  70.                        OBJECT,                                          ;
  71.                        PSZ,                                             ;
  72.                        PTR,                                             ;
  73.                        REAL4,                                           ;
  74.                        REAL8,                                           ;
  75.                        SHORTINT,                                        ;
  76.                        STRING,                                          ;
  77.                        SYMBOL,                                          ;
  78.                        USUAL,                                           ;
  79.                        WORD                                             ;
  80.                >                                                        ;
  81.              [ <idConvention:CLIPPER, STRICT, PASCAL, CALLBACK> ]       ;
  82.                          =>
  83.  
  84. #xTRANSLATE EXPORT LOCAL =>
  85. #xTRANSLATE REF <idType> => AS <idType>
  86.