Grok v0.98d
Error Messages

Fatal Errors

   X1001 Out of memory
   X1002 Out of memory -- preprocessor
   X1003 Out of memory -- identifiers and constants
   X1004 No files to process
   X1005 Input buffer overflow
   X1006 #include file nesting depth reproached
   X1007 Error writing preprocessor (.ci) file
   X1008 Pre-compiled header not found
   X1009 Error reading pre-compiled header
   X1010 Error writing pre-compiled header
   X1011 Invalid (.xhr) file or version mismatch
   X1012 Too many pre-compiled directives
   X1013 Cannot read list (.clp) file
   X1014 Cannot read response file
   X1015 Bad command line parameter
   X1016 Unrecognized command line option
   X1017 Symbol table overflow
   X1018 Control stack overflow
   X1019 Control stack underflow
   X1020 Control stack failure
   X1021 Expression stack overflow
   X1022 Expression stack underflow
   X1023 Suspect END corrupts expression stack
   X1024 Declaration: illegal symbol type
   X1025 #include -- file not found
   X1026 Undefined target in DO invocation
   X1027 Unrecognized branch instruction
   X1028 Can't open source file
   X1029 Message stack overflow
   X1030 Message stack underflow
   X1031 internal error
   X1032 DOA -- mortis le rigeur du jour

Errors

   X2001 Syntax error
   X2002 Incomplete statement or unbalanced delimiters
   X2003 Unterminated string
   X2004 Open comment block -- /*
   X2005 Invalid statement, unexpected token
   X2006 Unrecognized preprocessor directive
   X2007 #define -- syntax error; expecting identifier
   X2008 #define -- unexpected end of file
   X2009 #define -- requires text marker
   X2010 #define -- syntax error; expecting ',' or ')'
   X2011 #define -- parameter threshold exceeded
   X2012 #define -- circular definition
   X2013 #ifdef/#ifndef -- nesting level exceeded
   X2014 #ifdef/#ifndef -- syntax error
   X2015 #ifdef/#ifndef -- open conditional block
   X2016 #include -- illegal file name
   X2017 #else -- does not match #ifdef
   X2018 #error
   X2019 #trans/#comm -- missing '=>' separator
   X2020 #trans/#comm -- unrecognized result (rhs) marker
   X2021 #trans/#comm -- invalid match (lhs) marker
   X2022 #trans/#comm -- invalid result (rhs) marker
   X2023 #trans/#comm -- invalid restricted match (lhs) marker
   X2024 #trans/#comm -- empty optional clause
   X2025 #trans/#comm -- optional clause requires closure
   X2026 #trans/#comm -- ambiguous match pattern
   X2027 #trans/#comm -- illegal nested clause
   X2028 #trans/#comm -- match marker limit exceeded
   X2029 #translate -- circular definition
   X2030 #command -- circular definition
   X2031 #undef -- syntax error
   X2032 Unterminated TEXT...ENDTEXT
   X2033 EXIT instruction spans BEGIN SEQUENCE...END
   X2034 LOOP instruction spans BEGIN SEQUENCE...END
   X2035 Illegal EXIT instruction
   X2036 Illegal LOOP instruction
   X2037 Conflict in procedure name of CALL statement
   X2038 Illegal CALL of Clipper procedure or function
   X2039 Illegal symbol mode
   X2040 Duplicitous CALL
   X2041 Procedure redefinition
   X2042 CALLed procedure redefinition
   X2043 Duplicitous variable declaration
   X2044 Initializer is not constant
   X2045 Block variable out of scope
   X2046 Unclosed control structure
   X2047 ELSE out of context
   X2048 ELSEIF out of context
   X2049 ENDIF out of context
   X2050 NEXT out of context
   X2051 ENDDO out of context
   X2052 ENDCASE out of context
   X2053 Unenclosed CASE or OTHERWISE clause
   X2054 Illegal SEQUENCE nesting
   X2055 Formal parameters previously declared
   X2056 Invalid number of arguments
   X2057 Complex macro in GET
   X2058 Code block has macro and declared symbol
   X2059 Name contradicts earlier declaration
   X2060 Untrapped syntax error
   X2061 LOCAL statement must appear in declarative block
   X2062 MEMVAR statement must appear in declarative block
   X2063 FIELD statement must appear in declarative block
   X2064 STATIC statement must appear in declarative block
   X2065 Duplicitous ANNOUNCE declaration
   X2066 Illegal declaration
   X2067 Invalid TEXT statement
   X2068 Declared symbol in macro
   X2069 Redefinition of built in function
   X2070 Executable statement with no enclosing context
   X2071 Too many local variables
   X2072 Too many local parameters
   X2073 Too many parameters
   X2074 Invalid inline unary operator
   X2075 Return statement disallowed within Sequence
   X2076 Invalid selector in message send
   X2077 '@' reference operator invalid in this context
   X2078 Illegal declaration
   X2079 Illegal l-value
   X2080 Illegal alias expression
   X2081 Illegal selector in message dispatch
   X2082 Illegal binary operator
   X2083 Invalid number of arguments
   X2084 Illegal function call
   X2085 Illegal CALL
   X2086 Illegal DO
   X2087 Illegal case clause
   X2088 Unrecognized message number in pragma
   X2089 Restore pragma -- no messages to restore

Warnings 1 (standard warnings)

   X3001 #define -- duplicitous definition
   X3002 #define -- command line def may be suspect
   X3003 #ifdef/#ifndef -- conditional block spans compilation unit
   X3004 #line directive ignored -- may be reading .ppo file
   X3005 Parameter in DO .prg invalid, ignored
   X3006 No value specified for return statement in function
   X3007 Procedure returns value
   X3008 Return statement omitted at end of function declaration
   X3009 Variable reference ambiguous
   X3010 Variable reference ambiguous -- memvar assumed
   X3011 File not found -- assuming external linkage
   X3012 Message limit exceeded
   X3013 Invalid command line argument ignored

Warnings 2 (problems)

   X4001 Variable referenced prior to assignment or initialization
   X4002 Unreferenced formal parameter
   X4003 Local variable declared but never referenced
   X4004 Unreferenced static variable
   X4005 Unreachable code -- WHILE condition never true
   X4006 Conditional expression is NIL
   X4007 Infinite loop -- STEP by zero
   X4008 Code block an invalid conditional expression
   X4009 Irrational FOR loop -- STEP out of range
   X4010 STEP and TO arguments identical -- FOR loop executed once
   X4011 Unreachable code
   X4012 Function requires return statement
   X4013 Statement may be rejected due to language anomaly

Warnings 3 (unusual)

   X5001 Compound statement in conditional expression
   X5002 Returning compound statement
   X5003 CASE/OTHERWISE clause has no body
   X5004 Identifier significance masks undeclared variable
   X5005 Return statement omitted in procedure definition
   X5006 Code block may mask ambiguous variable
   X5007 Preprocessor directive masks built-in function
   X5008 INIT/EXIT function -- return value meaningless
   X5009 Variable not initialized prior to pass by reference
   X5010 Assigning result of compound statement
   X5011 No executable statements in source file

Warnings 4 (style and discretionary)

   X6001 Recursive call in function or procedure
   X6002 Procedure or function has multiple exit points
   X6003 Function or procedure uses old-style declarator
   X6004 Function may export local variables via code block
   X6005 FOR has no body
   X6006 WHILE has no body
   X6007 DO CASE statement has no OTHERWISE clause
   X6008 Possibly benign assignment -- review l-value
   X6009 Conditional expression is constant
   X6010 Function returns NIL
   X6011 Possible reference prior to initialization -- review
   X6012 Possible pass by reference prior to initialization -- review
   X6013 Branch from FOR/WHILE loop not enclosed in conditional block


Documentation

Switches


   /p    generate .ppo file

         This switch is accepted by Grok but is otherwise ignored. If
         you are encountering problems compiling a CA-Clipper program
         and you suspect it is related to the preprocessor, refer
         to this option in the Compiler Chapter of the CA-Clipper
         Programming and Utilities guide.


   /xi   generate intermediate preprocessor file

         This switch is used strictly for diagnosing Grok. If enabled,
         an intermediate file (base file name w/ .ci extension) is
         output by the analyzer at the conclusion of the preprocessing
         phase. The resultant file represents an approximation of the
         source after it has been fully preprocessed.

         CAUTION: Do not use .ci output to diagnose problems with your
         CA-Clipper programs. The .ppo file produced by CA-Clipper is
         the authority in every circumstance. Although we have gone
         to great pains to make the .ci output appear similar to a
         .ppo file, there are known inconsistencies.


Messages

   Grok emits a great number of messages; however, it is important to
   note that not every message is indicative of a problem with your code.
   In fact, Grok tries to output as many diagnostics as it possibly can --
   everything from "business as usual" to the rare and bizarre. Without
   the judgment of an experienced CA-Clipper programmer, the messages
   produced are little more than noise.

   There are a couple of things to keep in mind:

      1. Messages with the terms "may" or "possible" need to be examined
         closely, especially if the word "review" appears in the message.
         Grok encountered something suspect, but could not arrive at
         a conclusive determination. One example of this is the message:

         warn4 X6008 : Possibly benign assignment -- review l-value : <x>

         if <x> is an array or if <x> was passed by reference, this is
         probably a bogus message. The assignment was performed for its
         side effect.

      2. Its a good idea to "grok" your source at the highest warning
         level (either /w or /xw:5) at least once. Review each message
         carefully and if you determine that it is not a problem,
         enclose the code fragment in a comment pragma thusly:

            //grok -save -e6009
            do while ( .T. )
               ...
            enddo
            //grok -restore

      3. Some problems may not be immediately evident when viewing the
         source. Remember that the preprocessor can effectively "hide"
         or otherwise mutate source statements. For instance, the message,
         "warn4 X6009 : Conditional expression is constant", is produced
         for all of the following statements:

            SET CURSOR ON
            USE big.dbf ALIAS large
            SET CURSOR OFF

         Lets take a closer look at SET CURSOR. Here's the target
         pattern from the preprocessor directive in std.ch:

            SetCursor( if( Upper( <(x)> ) == "ON", 1, 0 ) )

         Because <(x)> may only receive the constant value "ON" or
         "OFF", the expression is reduced to:

            Upper( "on" ) == "ON"

         The resultant expression will always evaluate to true, and
         hence the message: "Conditional expression is constant".

      4. If a problem is not immediately evident from viewing the source,
         use the CA-Clipper compiler to produce a .ppo file. This is the
         quickest way to eliminate doubt.

      5. Some messages are related to style and may just be to voluminous
         for you to handle:

         warn4 X6010 : Function returns NIL

         Messages can be disabled (or enabled) globally from the command
         line, the GROKCMD environment variable or a response file using
         Groks message directives:

            grok myprog /m /n /w -e6010


is for sale for US $249 ( DM 398,- ) from:

   USA
   
   Interface Technologies, Inc.
   503 Camino Real
   Redondo Beach, CA 90277-3817 USA
   Voice:      310.540.5497
   CompuServe: 71510,3321

   Europe
   
   Ŀ
    Adress:                    Tel.:+49-40-7661290 
    SOFTSOL GmbH               Fax :+49-40-7665664 
    Neue Str.35a               BBS :+49-40-7665527 
    21073 Hamburg              CIS : 100112,3401   
    Germany                    Fido: 2:240/5300    
   

