error -1584
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I use variable "pl_t" in "module.4gl". When I compile this module I get error in file "module.ec". Error number is -1584: "Inconsistent type declaration". I can't find any information about this error. When I changed variable, for example to "pl_t1", error disappeared. TIA Daniel
Daniel Tendaj wrote: > I use variable "pl_t" in "module.4gl". > When I compile this module I get error in file "module.ec". > Error number is -1584: "Inconsistent type declaration". > I can't find any information about this error. > When I changed variable, for example to "pl_t1", > error disappeared. > > TIA > Daniel Check "pl_t" in all your 4gl code to see if you have defined it as LIKE some other veritable, or part of a record or part of a table. Also check in the global section of your program, you may find that "pl_t" has been typed differently in two different parts of the program. (my guess is that it is a global veritable then in the module you describe it is being re-typed.) The problem would go away if you change the name in the module, because it would be a new veritable and its typing would not clash. -- Compliments of QueriX -------------------------------------------------------------------------------------------------- QueriX 4GL Compilers are Informix 4GL Compatible, and Connection to other RDBMS such as Oracle. Hydra 4GL Compiler Compile once, run everywhere Phoenix Windows GUI. Chimera Java GUI The only GUI you will ever need... Arachne Web Technology For more details visit: http://www.querix.com/ ---------------------------------------------------------------------------------------------------
Contents of the module is: # define pl_t char(1) main end main # I compile it with command: c4gl -c module.4gl Environment: HP-UX 11, I 4GL 7.20, IDS 7.23 Daniel
Daniel Tendaj wrote: > > Contents of the module is: > > # > define pl_t char(1) > > main > end main > # I don't remeber for sure but I think you cannot have a define outside of main except in a GLOBALS statement or statement block. Thus this test prog would be either: GLOBALS define pl_t char(1) END GLOBALS MAIN END MAIN --OR-- MAIN define pl_t char(1) END MAIN Also I thought the DATABASE statement at the top of each module was manditory? > I compile it with command: c4gl -c module.4gl > > Environment: HP-UX 11, I 4GL 7.20, IDS 7.23 > > Daniel Art S. Kagel
"Art S. Kagel" wrote: > Daniel Tendaj wrote: > > Contents of the module is: > > > > # > > define pl_t char(1) > > > > main > > end main > > # > > I don't remember for sure but I think you cannot have a define outside of > main except in a GLOBALS statement or statement block. Not so; the code is valid. The variable is a module variable, accessible only within this file. Think 'C file static variable'. > Also I thought the DATABASE statement at the top of each module was > mandatory? It isn't your day for remembering, is it, Art? You only need the non-procedural database statement when you use DEFINE x LIKE y.z or DEFINE r RECORD LIKE t.*; otherwise, you do not need it. > > I compile it with command: c4gl -c module.4gl > > > > Environment: HP-UX 11, I 4GL 7.20, IDS 7.23 I don't recall the details of the problem beyond it being something to do with pl_t being doubly defined. There are many symbols defined by the I4GL libraries, and many more defined by the system C libraries, which you should not use in your programs. I don't know what pl_t is used for, nor where. However, it appears to be one such symbol. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN #include <disclaimer.h>