Browse Source

* updated some error messages

peter 27 years ago
parent
commit
58c2d999f0

+ 14 - 11
compiler/cg386add.pas

@@ -269,7 +269,7 @@ implementation
                ungetiftemp(p^.left^.location.reference);
                ungetiftemp(p^.left^.location.reference);
                ungetiftemp(p^.right^.location.reference);
                ungetiftemp(p^.right^.location.reference);
             end;
             end;
-            else Message(sym_e_type_mismatch);
+            else Message(type_e_mismatch);
           end;
           end;
         SetResultLocation(cmpop,true,p);
         SetResultLocation(cmpop,true,p);
       end;
       end;
@@ -385,7 +385,7 @@ implementation
                      p^.location.reference:=href;
                      p^.location.reference:=href;
                    end;
                    end;
         else
         else
-          Message(sym_e_type_mismatch);
+          Message(type_e_mismatch);
         end;
         end;
         SetResultLocation(cmpop,true,p);
         SetResultLocation(cmpop,true,p);
       end;
       end;
@@ -496,7 +496,7 @@ implementation
                                  falselabel:=ofl;
                                  falselabel:=ofl;
                               end;
                               end;
                        else
                        else
-                         Message(sym_e_type_mismatch);
+                         Message(type_e_mismatch);
                        end;
                        end;
                        secondpass(p^.right);
                        secondpass(p^.right);
                        maketojumpbool(p^.right);
                        maketojumpbool(p^.right);
@@ -514,7 +514,7 @@ implementation
                        goto do_normal;
                        goto do_normal;
                     end
                     end
              else
              else
-               Message(sym_e_type_mismatch);
+               Message(type_e_mismatch);
              end
              end
            end
            end
          else
          else
@@ -640,7 +640,7 @@ implementation
                                   unsigned:=false;
                                   unsigned:=false;
                                 end
                                 end
                                else
                                else
-                                Message(sym_e_type_mismatch);
+                                Message(type_e_mismatch);
                              end;
                              end;
                       muln : begin
                       muln : begin
                                if is_set then
                                if is_set then
@@ -682,7 +682,7 @@ implementation
                        orn : op:=A_OR;
                        orn : op:=A_OR;
                       andn : op:=A_AND;
                       andn : op:=A_AND;
                    else
                    else
-                     Message(sym_e_type_mismatch);
+                     Message(type_e_mismatch);
                    end;
                    end;
 
 
                    { left and right no register?  }
                    { left and right no register?  }
@@ -907,7 +907,7 @@ implementation
                       ltn,lten,gtn,gten,
                       ltn,lten,gtn,gten,
                       equaln,unequaln :
                       equaln,unequaln :
                                 cmpop:=true;
                                 cmpop:=true;
-                      else Message(sym_e_type_mismatch);
+                      else Message(type_e_mismatch);
                    end;
                    end;
                    unsigned:=true;
                    unsigned:=true;
                    { left and right no register? }
                    { left and right no register? }
@@ -992,7 +992,7 @@ implementation
                                             op:=A_FCOMPP;
                                             op:=A_FCOMPP;
                                             cmpop:=true;
                                             cmpop:=true;
                                          end;
                                          end;
-                       else Message(sym_e_type_mismatch);
+                       else Message(type_e_mismatch);
                     end;
                     end;
 
 
                     if (p^.right^.location.loc<>LOC_FPU) then
                     if (p^.right^.location.loc<>LOC_FPU) then
@@ -1158,7 +1158,7 @@ implementation
                         op:=A_POR;
                         op:=A_POR;
                       andn:
                       andn:
                         op:=A_PAND;
                         op:=A_PAND;
-                      else Message(sym_e_type_mismatch);
+                      else Message(type_e_mismatch);
                    end;
                    end;
                    { left and right no register?  }
                    { left and right no register?  }
                    { then one must be demanded    }
                    { then one must be demanded    }
@@ -1271,7 +1271,7 @@ implementation
                      end;
                      end;
                 end
                 end
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
-              else Message(sym_e_type_mismatch);
+              else Message(type_e_mismatch);
            end;
            end;
        SetResultLocation(cmpop,unsigned,p);
        SetResultLocation(cmpop,unsigned,p);
     end;
     end;
@@ -1280,7 +1280,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  1998-08-28 10:54:18  peter
+  Revision 1.9  1998-09-04 08:41:36  peter
+    * updated some error messages
+
+  Revision 1.8  1998/08/28 10:54:18  peter
     * fixed smallset generation from elements, it has never worked before!
     * fixed smallset generation from elements, it has never worked before!
 
 
   Revision 1.7  1998/08/19 14:56:59  peter
   Revision 1.7  1998/08/19 14:56:59  peter

+ 5 - 2
compiler/cg386cal.pas

@@ -133,7 +133,7 @@ implementation
               else
               else
                 begin
                 begin
                    if not(p^.left^.location.loc in [LOC_MEM,LOC_REFERENCE]) then
                    if not(p^.left^.location.loc in [LOC_MEM,LOC_REFERENCE]) then
-                     Message(sym_e_type_mismatch)
+                     Message(type_e_mismatch)
                    else
                    else
                      begin
                      begin
                        if inlined then
                        if inlined then
@@ -1408,7 +1408,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.21  1998-09-01 12:47:57  peter
+  Revision 1.22  1998-09-04 08:41:37  peter
+    * updated some error messages
+
+  Revision 1.21  1998/09/01 12:47:57  peter
     * use pdef^.size instead of orddef^.typ
     * use pdef^.size instead of orddef^.typ
 
 
   Revision 1.20  1998/08/31 12:22:15  peter
   Revision 1.20  1998/08/31 12:22:15  peter

+ 5 - 2
compiler/cg386cnv.pas

@@ -614,7 +614,7 @@ implementation
            parraydef(p^.left^.resulttype)^.lowrange+1;
            parraydef(p^.left^.resulttype)^.lowrange+1;
 
 
          if l>255 then
          if l>255 then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          { write the length }
          { write the length }
              exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,S_B,l,
              exprasmlist^.concat(new(pai386,op_const_ref(A_MOV,S_B,l,
@@ -1252,7 +1252,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.16  1998-09-03 17:39:03  florian
+  Revision 1.17  1998-09-04 08:41:38  peter
+    * updated some error messages
+
+  Revision 1.16  1998/09/03 17:39:03  florian
     + better code for type conversation longint/dword to real type
     + better code for type conversation longint/dword to real type
 
 
   Revision 1.15  1998/09/03 16:24:50  florian
   Revision 1.15  1998/09/03 16:24:50  florian

+ 9 - 3
compiler/cg386flw.pas

@@ -541,7 +541,7 @@ do_jmp:
                    emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
                    emitpushreferenceaddr(exprasmlist,p^.left^.location.reference);
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai386,op_reg(A_PUSH,S_L,
                        p^.left^.location.register)));
                        p^.left^.location.register)));
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               emitcall('FPC_RAISEEXCEPTION',true);
               emitcall('FPC_RAISEEXCEPTION',true);
              end
              end
@@ -740,7 +740,10 @@ do_jmp:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.14  1998-09-03 17:08:39  pierre
+  Revision 1.15  1998-09-04 08:41:39  peter
+    * updated some error messages
+
+  Revision 1.14  1998/09/03 17:08:39  pierre
     * better lines for stabs
     * better lines for stabs
       (no scroll back to if before else part
       (no scroll back to if before else part
       no return to case line at jump outside case)
       no return to case line at jump outside case)
@@ -755,7 +758,10 @@ end.
   Revision 1.11  1998/08/05 16:00:10  florian
   Revision 1.11  1998/08/05 16:00:10  florian
     * some fixes for ansi strings
     * some fixes for ansi strings
     * $log$ to $Log$
     * $log$ to $Log$
-    * $log$ to Revision 1.14  1998-09-03 17:08:39  pierre
+    * $log$ to Revision 1.15  1998-09-04 08:41:39  peter
+    * $log$ to   * updated some error messages
+    * $log$ to
+    * $log$ to Revision 1.14  1998/09/03 17:08:39  pierre
     * $log$ to   * better lines for stabs
     * $log$ to   * better lines for stabs
     * $log$ to     (no scroll back to if before else part
     * $log$ to     (no scroll back to if before else part
     * $log$ to     no return to case line at jump outside case)
     * $log$ to     no return to case line at jump outside case)

+ 18 - 26
compiler/cg386inl.pas

@@ -277,18 +277,18 @@ implementation
                        stringdef : begin
                        stringdef : begin
                                      if doread then
                                      if doread then
                                        begin
                                        begin
-                                       { push maximum string length }
-                                       push_int(pstringdef(pararesult)^.len);
-                                       case pstringdef(pararesult)^.string_typ of
-                                        st_shortstring:
-                                          emitcall ('READ_TEXT_STRING',true);
-                                        st_ansistring:
-                                          emitcall ('READ_TEXT_ANSISTRING',true);
-                                        st_longstring:
-                                          emitcall ('READ_TEXT_LONGSTRING',true);
-                                        st_widestring:
-                                          emitcall ('READ_TEXT_ANSISTRING',true);
-                                        end
+                                         { push maximum string length }
+                                         push_int(pstringdef(pararesult)^.len);
+                                         case pstringdef(pararesult)^.string_typ of
+                                          st_shortstring:
+                                            emitcall ('READ_TEXT_STRING',true);
+                                          st_ansistring:
+                                            emitcall ('READ_TEXT_ANSISTRING',true);
+                                          st_longstring:
+                                            emitcall ('READ_TEXT_LONGSTRING',true);
+                                          st_widestring:
+                                            emitcall ('READ_TEXT_ANSISTRING',true);
+                                          end
                                        end
                                        end
                                      else
                                      else
                                        Case pstringdef(Pararesult)^.string_typ of
                                        Case pstringdef(Pararesult)^.string_typ of
@@ -309,9 +309,7 @@ implementation
                                            emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
                                            emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
                                          else
                                          else
                                            emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
                                            emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
-                                       end
-                                     else
-                                      Message(parser_e_illegal_parameter_list);
+                                       end;
                                    end;
                                    end;
                         arraydef : begin
                         arraydef : begin
                                      if (parraydef(pararesult)^.lowrange=0) and
                                      if (parraydef(pararesult)^.lowrange=0) and
@@ -321,9 +319,7 @@ implementation
                                            emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
                                            emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
                                          else
                                          else
                                            emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
                                            emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
-                                       end
-                                     else
-                                      Message(parser_e_illegal_parameter_list);
+                                       end;
                                    end;
                                    end;
                         floatdef : begin
                         floatdef : begin
                                      if doread then
                                      if doread then
@@ -360,12 +356,8 @@ implementation
                                                     Message(parser_e_illegal_parameter_list)
                                                     Message(parser_e_illegal_parameter_list)
                                                   else
                                                   else
                                                     emitcall('WRITE_TEXT_BOOLEAN',true);
                                                     emitcall('WRITE_TEXT_BOOLEAN',true);
-                                     else
-                                       Message(parser_e_illegal_parameter_list);
                                      end;
                                      end;
                                    end;
                                    end;
-                          else
-                            Message(parser_e_illegal_parameter_list);
                           end;
                           end;
                        end;
                        end;
                    { load ESI in methods again }
                    { load ESI in methods again }
@@ -383,16 +375,13 @@ implementation
                   if doln then
                   if doln then
                     emitcall('READLN_END',true)
                     emitcall('READLN_END',true)
                   else
                   else
-
                     emitcall('READ_END',true);
                     emitcall('READ_END',true);
                 end
                 end
-
                else
                else
                 begin
                 begin
                   if doln then
                   if doln then
                     emitcall('WRITELN_END',true)
                     emitcall('WRITELN_END',true)
                   else
                   else
-
                     emitcall('WRITE_END',true);
                     emitcall('WRITE_END',true);
                 end;
                 end;
                popusedregisters(pushed);
                popusedregisters(pushed);
@@ -924,7 +913,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-08-31 12:22:14  peter
+  Revision 1.2  1998-09-04 08:41:40  peter
+    * updated some error messages
+
+  Revision 1.1  1998/08/31 12:22:14  peter
     * secondinline moved to cg386inl
     * secondinline moved to cg386inl
 
 
   Revision 1.19  1998/08/31 08:52:03  peter
   Revision 1.19  1998/08/31 08:52:03  peter

+ 5 - 2
compiler/cg386set.pas

@@ -172,7 +172,7 @@ implementation
                      (p^.left^.resulttype^.deftype=enumdef) and (penumdef(p^.left^.resulttype)^.max<=32));
                      (p^.left^.resulttype^.deftype=enumdef) and (penumdef(p^.left^.resulttype)^.max<=32));
 
 
          { Can we generate jumps? Possible for all types of sets }
          { Can we generate jumps? Possible for all types of sets }
-         if (p^.right^.treetype=setconstrn) and
+         if (p^.right^.treetype=setconstn) and
             analizeset(p^.right^.constset,use_small) then
             analizeset(p^.right^.constset,use_small) then
           begin
           begin
             { It gives us advantage to check for the set elements
             { It gives us advantage to check for the set elements
@@ -778,7 +778,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  1998-09-03 17:08:40  pierre
+  Revision 1.11  1998-09-04 08:41:41  peter
+    * updated some error messages
+
+  Revision 1.10  1998/09/03 17:08:40  pierre
     * better lines for stabs
     * better lines for stabs
       (no scroll back to if before else part
       (no scroll back to if before else part
       no return to case line at jump outside case)
       no return to case line at jump outside case)

+ 15 - 12
compiler/cg68kadd.pas

@@ -341,7 +341,7 @@ implementation
                            ungetiftemp(p^.left^.location.reference);
                            ungetiftemp(p^.left^.location.reference);
                            ungetiftemp(p^.right^.location.reference);
                            ungetiftemp(p^.right^.location.reference);
                         end; { end this case }
                         end; { end this case }
-                else Message(sym_e_type_mismatch);
+                else Message(type_e_mismatch);
               end; { end case }
               end; { end case }
 
 
         SetResultLocation(cmpop,true,p);
         SetResultLocation(cmpop,true,p);
@@ -458,7 +458,7 @@ implementation
                      p^.location.reference:=href;
                      p^.location.reference:=href;
                    end;
                    end;
         else
         else
-          Message(sym_e_type_mismatch);
+          Message(type_e_mismatch);
         end;
         end;
         SetResultLocation(cmpop,true,p);
         SetResultLocation(cmpop,true,p);
       end;
       end;
@@ -485,7 +485,7 @@ implementation
          opsize : topsize;
          opsize : topsize;
          hl4: plabel;
          hl4: plabel;
          tmpref : treference;
          tmpref : treference;
-        
+
 
 
          { true, if unsigned types are compared }
          { true, if unsigned types are compared }
          unsigned : boolean;
          unsigned : boolean;
@@ -567,7 +567,7 @@ implementation
                                  falselabel:=ofl;
                                  falselabel:=ofl;
                               end;
                               end;
                        else
                        else
-                         Message(sym_e_type_mismatch);
+                         Message(type_e_mismatch);
                        end;
                        end;
                        secondpass(p^.right);
                        secondpass(p^.right);
                        maketojumpbool(p^.right);
                        maketojumpbool(p^.right);
@@ -585,7 +585,7 @@ implementation
                        goto do_normal;
                        goto do_normal;
                     end
                     end
              else
              else
-               Message(sym_e_type_mismatch);
+               Message(type_e_mismatch);
              end
              end
            end
            end
          else
          else
@@ -691,7 +691,7 @@ implementation
                                   unsigned:=false;
                                   unsigned:=false;
                                 end
                                 end
                                else
                                else
-                                Message(sym_e_type_mismatch);
+                                Message(type_e_mismatch);
                              end;
                              end;
                       muln : begin
                       muln : begin
                                if is_set then
                                if is_set then
@@ -733,7 +733,7 @@ implementation
                        orn : op:=A_OR;
                        orn : op:=A_OR;
                       andn : op:=A_AND;
                       andn : op:=A_AND;
                    else
                    else
-                     Message(sym_e_type_mismatch);
+                     Message(type_e_mismatch);
                    end;
                    end;
 
 
                    { left and right no register?  }
                    { left and right no register?  }
@@ -978,7 +978,7 @@ implementation
                       ltn,lten,gtn,gten,
                       ltn,lten,gtn,gten,
                       equaln,unequaln :
                       equaln,unequaln :
                                 cmpop:=true;
                                 cmpop:=true;
-                      else Message(sym_e_type_mismatch);
+                      else Message(type_e_mismatch);
                    end;
                    end;
                    unsigned:=true;
                    unsigned:=true;
                    { left and right no register? }
                    { left and right no register? }
@@ -1063,7 +1063,7 @@ implementation
                                             op:=A_FCMP;
                                             op:=A_FCMP;
                                             cmpop:=true;
                                             cmpop:=true;
                                          end;
                                          end;
-                       else Message(sym_e_type_mismatch);
+                       else Message(type_e_mismatch);
                     end;
                     end;
 
 
                     if (p^.left^.location.loc <> LOC_FPU) and
                     if (p^.left^.location.loc <> LOC_FPU) and
@@ -1252,9 +1252,9 @@ implementation
                              end;
                              end;
                          end;
                          end;
                  end
                  end
-                
 
 
-              else Message(sym_e_type_mismatch);
+
+              else Message(type_e_mismatch);
            end;
            end;
        SetResultLocation(cmpop,unsigned,p);
        SetResultLocation(cmpop,unsigned,p);
     end;
     end;
@@ -1263,7 +1263,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-09-01 09:07:09  peter
+  Revision 1.2  1998-09-04 08:41:42  peter
+    * updated some error messages
+
+  Revision 1.1  1998/09/01 09:07:09  peter
     * m68k fixes, splitted cg68k like cgi386
     * m68k fixes, splitted cg68k like cgi386
 
 
 }
 }

+ 5 - 2
compiler/cg68kcal.pas

@@ -111,7 +111,7 @@ implementation
                 begin
                 begin
                    if (p^.left^.location.loc<>LOC_REFERENCE) and
                    if (p^.left^.location.loc<>LOC_REFERENCE) and
                       (p^.left^.location.loc<>LOC_MEM) then
                       (p^.left^.location.loc<>LOC_MEM) then
-                     Message(sym_e_type_mismatch)
+                     Message(type_e_mismatch)
                    else
                    else
                      begin
                      begin
                         emitpushreferenceaddr(p^.left^.location.reference);
                         emitpushreferenceaddr(p^.left^.location.reference);
@@ -1046,7 +1046,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1998-09-01 12:47:59  peter
+  Revision 1.3  1998-09-04 08:41:43  peter
+    * updated some error messages
+
+  Revision 1.2  1998/09/01 12:47:59  peter
     * use pdef^.size instead of orddef^.typ
     * use pdef^.size instead of orddef^.typ
 
 
   Revision 1.1  1998/09/01 09:07:09  peter
   Revision 1.1  1998/09/01 09:07:09  peter

+ 6 - 3
compiler/cg68kcnv.pas

@@ -680,7 +680,7 @@ implementation
            parraydef(p^.left^.resulttype)^.lowrange+1;
            parraydef(p^.left^.resulttype)^.lowrange+1;
 
 
          if l>255 then
          if l>255 then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          { write the length }
          { write the length }
            exprasmlist^.concat(new(pai68k,op_const_ref(A_MOVE,S_B,l,
            exprasmlist^.concat(new(pai68k,op_const_ref(A_MOVE,S_B,l,
@@ -1195,7 +1195,7 @@ implementation
 
 
       begin
       begin
         InternalError(342132);
         InternalError(342132);
-{!!!!!!!!!!!    
+{!!!!!!!!!!!
 
 
          p^.location.loc:=LOC_REGISTER;
          p^.location.loc:=LOC_REGISTER;
          getlabel(l1);
          getlabel(l1);
@@ -1376,7 +1376,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-09-01 09:07:09  peter
+  Revision 1.2  1998-09-04 08:41:45  peter
+    * updated some error messages
+
+  Revision 1.1  1998/09/01 09:07:09  peter
     * m68k fixes, splitted cg68k like cgi386
     * m68k fixes, splitted cg68k like cgi386
 
 
 }
 }

+ 6 - 3
compiler/cg68kflw.pas

@@ -432,7 +432,7 @@ implementation
                               newreference(p^.left^.location.reference),R_D0)))
                               newreference(p^.left^.location.reference),R_D0)))
                           else
                           else
                             exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,p^.left^.location.register,R_D0)));
                             exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,p^.left^.location.register,R_D0)));
-                        end
+                        end;
              floatdef : begin
              floatdef : begin
                           { floating point return values .... }
                           { floating point return values .... }
                           { single are returned in d0         }
                           { single are returned in d0         }
@@ -574,7 +574,7 @@ do_jmp:
                  LOC_MEM,LOC_REFERENCE : emitpushreferenceaddr(p^.left^.location.reference);
                  LOC_MEM,LOC_REFERENCE : emitpushreferenceaddr(p^.left^.location.reference);
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,
                  LOC_CREGISTER,LOC_REGISTER : exprasmlist^.concat(new(pai68k,op_reg_reg(A_MOVE,S_L,
                    p^.left^.location.register,R_SPPUSH)));
                    p^.left^.location.register,R_SPPUSH)));
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               emitcall('FPC_RAISEEXCEPTION',true);
               emitcall('FPC_RAISEEXCEPTION',true);
              end
              end
@@ -776,7 +776,10 @@ do_jmp:
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1998-09-01 12:48:01  peter
+  Revision 1.3  1998-09-04 08:41:47  peter
+    * updated some error messages
+
+  Revision 1.2  1998/09/01 12:48:01  peter
     * use pdef^.size instead of orddef^.typ
     * use pdef^.size instead of orddef^.typ
 
 
   Revision 1.1  1998/09/01 09:07:09  peter
   Revision 1.1  1998/09/01 09:07:09  peter

+ 6 - 11
compiler/cg68kinl.pas

@@ -308,9 +308,7 @@ implementation
                                            emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
                                            emitcall('READ_TEXT_PCHAR_AS_POINTER',true)
                                          else
                                          else
                                            emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
                                            emitcall('WRITE_TEXT_PCHAR_AS_POINTER',true);
-                                       end
-                                     else
-                                      Message(parser_e_illegal_parameter_list);
+                                       end;
                                    end;
                                    end;
                         arraydef : begin
                         arraydef : begin
                                      if (parraydef(pararesult)^.lowrange=0) and
                                      if (parraydef(pararesult)^.lowrange=0) and
@@ -320,9 +318,7 @@ implementation
                                            emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
                                            emitcall('READ_TEXT_PCHAR_AS_ARRAY',true)
                                          else
                                          else
                                            emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
                                            emitcall('WRITE_TEXT_PCHAR_AS_ARRAY',true);
-                                       end
-                                     else
-                                      Message(parser_e_illegal_parameter_list);
+                                       end;
                                    end;
                                    end;
                         floatdef : begin
                         floatdef : begin
                                      if doread then
                                      if doread then
@@ -359,12 +355,8 @@ implementation
                                                     Message(parser_e_illegal_parameter_list)
                                                     Message(parser_e_illegal_parameter_list)
                                                   else
                                                   else
                                                     emitcall('WRITE_TEXT_BOOLEAN',true);
                                                     emitcall('WRITE_TEXT_BOOLEAN',true);
-                                     else
-                                       Message(parser_e_illegal_parameter_list);
                                      end;
                                      end;
                                    end;
                                    end;
-                          else
-                            Message(parser_e_illegal_parameter_list);
                           end;
                           end;
                        end;
                        end;
                    { load ESI in methods again }
                    { load ESI in methods again }
@@ -912,7 +904,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-09-01 09:07:09  peter
+  Revision 1.2  1998-09-04 08:41:48  peter
+    * updated some error messages
+
+  Revision 1.1  1998/09/01 09:07:09  peter
     * m68k fixes, splitted cg68k like cgi386
     * m68k fixes, splitted cg68k like cgi386
 
 
 }
 }

+ 5 - 2
compiler/cg68kset.pas

@@ -280,7 +280,7 @@ implementation
                 end
                 end
              else
              else
                 begin
                 begin
-                  if (p^.right^.treetype=setconstrn) and
+                  if (p^.right^.treetype=setconstn) and
                      analizeset(p^.right^.constset) then
                      analizeset(p^.right^.constset) then
                     begin
                     begin
                       {It gives us advantage to check for the set elements
                       {It gives us advantage to check for the set elements
@@ -812,7 +812,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.1  1998-09-01 09:07:09  peter
+  Revision 1.2  1998-09-04 08:41:49  peter
+    * updated some error messages
+
+  Revision 1.1  1998/09/01 09:07:09  peter
     * m68k fixes, splitted cg68k like cgi386
     * m68k fixes, splitted cg68k like cgi386
 
 
 }
 }

+ 6 - 3
compiler/cga68k.pas

@@ -189,7 +189,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
                          end;
                          end;
                        end;
                        end;
         else
         else
-         Message(sym_e_type_mismatch);
+         Message(type_e_mismatch);
         end;
         end;
       end;
       end;
 
 
@@ -377,7 +377,7 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
                 end;
                 end;
            end
            end
          else
          else
-          Message(sym_e_type_mismatch);
+          Message(type_e_mismatch);
       end;
       end;
 
 
     procedure emitoverflowcheck(p: ptree);
     procedure emitoverflowcheck(p: ptree);
@@ -1345,7 +1345,10 @@ end;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  1998-09-01 12:48:02  peter
+  Revision 1.14  1998-09-04 08:41:50  peter
+    * updated some error messages
+
+  Revision 1.13  1998/09/01 12:48:02  peter
     * use pdef^.size instead of orddef^.typ
     * use pdef^.size instead of orddef^.typ
 
 
   Revision 1.12  1998/09/01 09:07:09  peter
   Revision 1.12  1998/09/01 09:07:09  peter

+ 31 - 15
compiler/errorn.msg

@@ -20,6 +20,8 @@
 #   assem_    assembler parsing
 #   assem_    assembler parsing
 #   unit_     unit handling
 #   unit_     unit handling
 #   scan_     scanner
 #   scan_     scanner
+#   parser_   parser
+#   type_     type checking
 #   general_  general info
 #   general_  general info
 #   exec_     calls to assembler, linker, binder
 #   exec_     calls to assembler, linker, binder
 #
 #
@@ -119,8 +121,9 @@ parser_w_destructor_should_be_public=E_Destructor mag niet private or protected
 parser_n_only_one_destructor=N_Class heeft slechts 1 destructor
 parser_n_only_one_destructor=N_Class heeft slechts 1 destructor
 parser_e_no_local_objects=E_Lokale class definities zijn niet toegestaan
 parser_e_no_local_objects=E_Lokale class definities zijn niet toegestaan
 parser_e_no_anonym_objects=E_Anonieme class definities zijn niet toegestaan
 parser_e_no_anonym_objects=E_Anonieme class definities zijn niet toegestaan
-parser_e_ordinal_expected=E_Ordinale waarde verwacht
 parser_e_illegal_parameter_list=E_Foutieve parameter lijst
 parser_e_illegal_parameter_list=E_Foutieve parameter lijst
+parser_e_wrong_parameter_type=E_Foutieve parameter type meegegeven
+parser_e_wrong_parameter_size=E_Foutief aantal parameters meegegeven
 parser_e_overloaded_no_procedure=E_overladen identifieerder is geen functie identifieerder
 parser_e_overloaded_no_procedure=E_overladen identifieerder is geen functie identifieerder
 parser_e_overloaded_have_same_parameters=E_overladen functies hebben identieke parameterlijst
 parser_e_overloaded_have_same_parameters=E_overladen functies hebben identieke parameterlijst
 parser_e_header_dont_match_forward=E_functie declaratie klopt niet met voorwaartse declaratie $1
 parser_e_header_dont_match_forward=E_functie declaratie klopt niet met voorwaartse declaratie $1
@@ -128,8 +131,6 @@ parser_n_duplicate_enum=N_Slechts waarden kunnen overgeslagen worden in opsommin
 parser_n_interface_name_diff_implementation_name=N_Interface en implementatie namen zijn verschillend
 parser_n_interface_name_diff_implementation_name=N_Interface en implementatie namen zijn verschillend
 parser_e_too_much_lexlevel=E_functie meer dan 31 keer genest
 parser_e_too_much_lexlevel=E_functie meer dan 31 keer genest
 parser_e_range_check_error=E_Bereikfout bij evalueren constantes
 parser_e_range_check_error=E_Bereikfout bij evalueren constantes
-parser_e_pointer_type_expected=E_Pointer type verwacht
-parser_e_class_type_expected=E_class type verwacht
 parser_e_double_caselabel=E_Dubbel case geval
 parser_e_double_caselabel=E_Dubbel case geval
 parser_e_type_const_not_possible=E_Getypeerde constantes van classes zijn niet toegestaan
 parser_e_type_const_not_possible=E_Getypeerde constantes van classes zijn niet toegestaan
 parser_e_no_overloaded_procvars=E_functie variabelen van meervoudige functies zijn niet toegestaan
 parser_e_no_overloaded_procvars=E_functie variabelen van meervoudige functies zijn niet toegestaan
@@ -142,7 +143,6 @@ parser_p_procedure_start=P_procedure/functie $1 ($2) op lijn $3
 parser_e_error_in_real=E_Illegale vlottende komma constante
 parser_e_error_in_real=E_Illegale vlottende komma constante
 parser_e_fail_only_in_constructor=E_FAIL mag slechts in constructors gebruikt worden
 parser_e_fail_only_in_constructor=E_FAIL mag slechts in constructors gebruikt worden
 parser_e_no_paras_for_destructor=E_Destructors hebben geen parameters
 parser_e_no_paras_for_destructor=E_Destructors hebben geen parameters
-parser_e_strict_var_string_violation=E_String types stemmen niet overeen, wegens $V+ modus
 parser_e_only_class_methods_via_class_ref=E_Alleen class methodes kunnen gerefereerd met classe methodes
 parser_e_only_class_methods_via_class_ref=E_Alleen class methodes kunnen gerefereerd met classe methodes
 parser_e_only_class_methods=E_Alleen class methodes togankelijk in classen
 parser_e_only_class_methods=E_Alleen class methodes togankelijk in classen
 parser_e_case_mismatch=E_Constante en CASE type komen niet overeen
 parser_e_case_mismatch=E_Constante en CASE type komen niet overeen
@@ -166,15 +166,11 @@ parser_e_illegal_set_expr=E_Bereik fout in set constructor of dubbel set element
 parser_e_pointer_to_class_expected=E_Pointer naar class verwacht
 parser_e_pointer_to_class_expected=E_Pointer naar class verwacht
 parser_e_expr_have_to_be_constructor_call=E_Uitdrukking moet een constructor call zijn.
 parser_e_expr_have_to_be_constructor_call=E_Uitdrukking moet een constructor call zijn.
 parser_e_expr_have_to_be_destructor_call=E_Expression must be destructor call
 parser_e_expr_have_to_be_destructor_call=E_Expression must be destructor call
-parser_e_typeconflict_in_set=E_Type conflict tussen set elementen.
-parser_w_use_int_div_int_op=W_De operator / geeft een resultaat is van type real. Gebruik DIV voor integers.
 parser_e_invalid_record_const=E_Ongeldige volgorde van record leden.
 parser_e_invalid_record_const=E_Ongeldige volgorde van record leden.
 parser_e_false_with_expr=E_Type van uitdrukking moet class of record type zijn.
 parser_e_false_with_expr=E_Type van uitdrukking moet class of record type zijn.
 parser_e_void_function=E_Procedures kunnen geen resultaat teruggeven.
 parser_e_void_function=E_Procedures kunnen geen resultaat teruggeven.
 parser_e_constructors_always_objects=E_Constructors en Destructors moeten methodes zijn
 parser_e_constructors_always_objects=E_Constructors en Destructors moeten methodes zijn
-parser_w_convert_real_2_comp=W_Type conversion van floating type to COMP, hetgeen een integer type is.
 parser_e_operator_not_overloaded=E_Operator is niet hergedefineerd
 parser_e_operator_not_overloaded=E_Operator is niet hergedefineerd
-parser_e_varid_or_typeid_expected=E_Variable of type indentifieerder verwacht
 parser_e_no_reraise_possible=E_Re-raise is hier niet mogelijk
 parser_e_no_reraise_possible=E_Re-raise is hier niet mogelijk
 parser_e_no_new_or_dispose_for_classes=E_De uitgebreide syntax van NEW of DISPOSE is niet toegestaan voor classes
 parser_e_no_new_or_dispose_for_classes=E_De uitgebreide syntax van NEW of DISPOSE is niet toegestaan voor classes
 parser_e_asm_incomp_with_function_return=E_Assembler stemt niet overeen met functieresultaat type
 parser_e_asm_incomp_with_function_return=E_Assembler stemt niet overeen met functieresultaat type
@@ -189,7 +185,6 @@ parser_e_absolute_only_one_var=E_Absolute kan maar aan een variabele verbonden w
 parser_e_absolute_only_to_var_or_const=E_Absolute kan slechts aan variabelen of constantes verbonden worden.
 parser_e_absolute_only_to_var_or_const=E_Absolute kan slechts aan variabelen of constantes verbonden worden.
 parser_e_abstract_no_definition=E_Abtracte methodes kunnen niet gedefineerd worden.
 parser_e_abstract_no_definition=E_Abtracte methodes kunnen niet gedefineerd worden.
 parser_e_overloaded_must_be_all_global=E_Deze overladen procedure kan niet lokaal zijn, (moet geexporteerd worden)
 parser_e_overloaded_must_be_all_global=E_Deze overladen procedure kan niet lokaal zijn, (moet geexporteerd worden)
-parser_e_succ_and_pred_enums_with_assign_not_possible=E_SUCC of PRED op enumeratie types met toekenningen zijn niet mogelijk
 parser_w_virtual_without_constructor=W_Gebruike van Virtuele methods zonder constructor
 parser_w_virtual_without_constructor=W_Gebruike van Virtuele methods zonder constructor
 parser_m_macro_defined=M_Macro gedefinieerd: $1
 parser_m_macro_defined=M_Macro gedefinieerd: $1
 parser_m_macro_undefined=M_Macro ongedefinieerd: $1
 parser_m_macro_undefined=M_Macro ongedefinieerd: $1
@@ -203,7 +198,7 @@ parser_e_property_need_paras=E_Default eigenschappen moeten van type Array zijn.
 parser_e_constructor_cannot_be_not_virtual=E_Virtuele constructors worden alleen ondersteunt in het object model
 parser_e_constructor_cannot_be_not_virtual=E_Virtuele constructors worden alleen ondersteunt in het object model
 parser_e_no_default_property_available=E_Geen standaard eigenschap gevonden
 parser_e_no_default_property_available=E_Geen standaard eigenschap gevonden
 parser_e_cant_have_published=E_De class kan geen gepubliceerde sectie hebben, gebruik {$M+}
 parser_e_cant_have_published=E_De class kan geen gepubliceerde sectie hebben, gebruik {$M+}
-parser_forward_declaration_must_be_resolved=E_Declaratie van class $1 moet worden opgelost om de class als ouder te gebruiken
+parser_e_forward_declaration_must_be_resolved=E_Declaratie van class $1 moet worden opgelost om de class als ouder te gebruiken
 parser_e_no_local_operator=E_Lokake operatoren worden niet ondersteunt
 parser_e_no_local_operator=E_Lokake operatoren worden niet ondersteunt
 parser_e_proc_dir_not_allowed_in_interface=E_Procedure directive $1 niet toegestaan in interface sectie
 parser_e_proc_dir_not_allowed_in_interface=E_Procedure directive $1 niet toegestaan in interface sectie
 parser_e_proc_dir_not_allowed_in_implementation=E_Procedure directive $1 niet toegestaan in implementation sectie
 parser_e_proc_dir_not_allowed_in_implementation=E_Procedure directive $1 niet toegestaan in implementation sectie
@@ -215,20 +210,41 @@ parser_w_not_supported_for_inline=W_$1 wordt niet ondersteund voor inline proced
 parser_w_inlining_disabled=W_Inlining uitgeschakeld
 parser_w_inlining_disabled=W_Inlining uitgeschakeld
 parser_i_writing_browser_log=I_Schrijven van Browser logfile $1
 parser_i_writing_browser_log=I_Schrijven van Browser logfile $1
 parser_h_maybe_deref_caret_missing=H_misschien is het een wijzer, ^ wordt dan gemist
 parser_h_maybe_deref_caret_missing=H_misschien is het een wijzer, ^ wordt dan gemist
-parser_f_assembler_reader_not_supported=F_Geselecteerde assembler lezer wordt niet ondersteunt
+parser_f_assembler_reader_not_supported=F_Geselecteerde assembler lezer wordt niet ondersteund
+parser_e_proc_dir_conflict=E_Procedure directive $1 maakt conflicten met andere directives
+parser_e_call_convention_dont_match_forward=E_Calling convention doesn't match forward
+parser_e_register_calling_not_supported=E_Register calling (fastcall) wordt niet ondersteund
+
+#
+# Type Checking
+#
+type_e_mismatch=E_Types stemmen niet overeen
+type_e_integer_expr_expected=E_Integer expressie verwacht
+type_e_ordinal_expr_expected=E_Ordinal expressie verwacht
+type_e_type_id_expected=E_Type identifieerder verwacht
+type_e_variable_id_expected=E_Variabel identifier verwacht
+type_e_pointer_type_expected=E_Pointer type verwacht
+type_e_class_type_expected=E_class type verwacht
+type_e_varid_or_typeid_expected=E_Variable of type indentifieerder verwacht
+type_e_cant_eval_constant_expr=E_Kan constante expressie niet evaluaren
+type_e_set_element_are_not_comp=E_Elementen van set zijn incompatible
+type_w_convert_real_2_comp=W_Type conversion van floating type to COMP, hetgeen een integer type is.
+type_w_int_slash_int=W_De operator / geeft een resultaat is van type real
+type_h_use_div_for_int=Gebruik DIV voor integers.
+type_e_strict_var_string_violation=E_String types stemmen niet overeen, wegens $V+ modus
+type_e_succ_and_pred_enums_with_assign_not_possible=E_SUCC of PRED op enumeratie types met toekenningen zijn niet mogelijk
+type_e_cant_read_write_type=E_Kan niet lezen of schrijven met dit type variabele
+type_e_typeconflict_in_set=E_Type conflict tussen set elementen.
 
 
 #
 #
 # Symtable
 # Symtable
 #
 #
-sym_n_local_var_not_init_yet=N_Lokale variabele $1 schijnt niet geinitialiseerd te zijn !
 sym_e_id_not_found=E_Identifieerder niet gevonden $1
 sym_e_id_not_found=E_Identifieerder niet gevonden $1
 sym_f_internal_error_in_symtablestack=F_Interne fout in SymTableStack()
 sym_f_internal_error_in_symtablestack=F_Interne fout in SymTableStack()
 sym_e_duplicate_id=E_Dubbele identifieerder $1
 sym_e_duplicate_id=E_Dubbele identifieerder $1
 sym_e_unknown_id=E_Onbekende identifieerder $1
 sym_e_unknown_id=E_Onbekende identifieerder $1
 sym_e_forward_not_resolved=E_Voorwaartse declaratie niet opgelost $1
 sym_e_forward_not_resolved=E_Voorwaartse declaratie niet opgelost $1
 sym_f_id_already_typed=F_Type Identifieerder reeds gedefineerd als type
 sym_f_id_already_typed=F_Type Identifieerder reeds gedefineerd als type
-sym_e_type_id_expected=E_Type identifieerder verwacht
-sym_e_type_mismatch=E_Types stemmen niet overeen
 sym_e_error_in_type_def=E_Fout in type defenitie
 sym_e_error_in_type_def=E_Fout in type defenitie
 sym_e_type_id_not_defined=E_Type identifieerder niet gedefinieerd
 sym_e_type_id_not_defined=E_Type identifieerder niet gedefinieerd
 sym_e_only_static_in_static=E_Alleen statische variabelen kunnen gebruikt worden in statische methodes
 sym_e_only_static_in_static=E_Alleen statische variabelen kunnen gebruikt worden in statische methodes
@@ -245,7 +261,6 @@ sym_e_ill_type_decl_set=E_Type declaratie van set elementen is foutief
 sym_e_class_forward_not_resolved=E_Voorwaartse definitie van klasse niet opgelost $1
 sym_e_class_forward_not_resolved=E_Voorwaartse definitie van klasse niet opgelost $1
 sym_n_para_identifier_not_used=H_Parameter niet gebruikt $1
 sym_n_para_identifier_not_used=H_Parameter niet gebruikt $1
 sym_w_local_identifier_not_used=W_Lokale variable niet gebruikt $1
 sym_w_local_identifier_not_used=W_Lokale variable niet gebruikt $1
-sym_e_set_element_are_not_comp=E_Elementen van set zijn incompatible
 sym_e_set_expected=E_Set type verwacht
 sym_e_set_expected=E_Set type verwacht
 sym_w_function_result_not_set=W_Resultaat van functie ogeschijnlijk niet present
 sym_w_function_result_not_set=W_Resultaat van functie ogeschijnlijk niet present
 sym_e_illegal_field=E_Onbekend record lid
 sym_e_illegal_field=E_Onbekend record lid
@@ -528,6 +543,7 @@ option_info_end=                [email protected]
 #
 #
 ol_begin=**0*_+ switch option on, - off
 ol_begin=**0*_+ switch option on, - off
 ol001=**1a_the compiler doesn't delete the generated assembler file
 ol001=**1a_the compiler doesn't delete the generated assembler file
+ol120=**2al_list sourcecode lines in assembler file  (still BETA !!)
 ol002=*t1b_use EMS
 ol002=*t1b_use EMS
 ol003=**1B_build all modules
 ol003=**1B_build all modules
 ol004=**1C_code generation options
 ol004=**1C_code generation options

+ 24 - 14
compiler/msgidx.inc

@@ -68,8 +68,9 @@ type tmsgconst=(
   parser_n_only_one_destructor,
   parser_n_only_one_destructor,
   parser_e_no_local_objects,
   parser_e_no_local_objects,
   parser_e_no_anonym_objects,
   parser_e_no_anonym_objects,
-  parser_e_ordinal_expected,
   parser_e_illegal_parameter_list,
   parser_e_illegal_parameter_list,
+  parser_e_wrong_parameter_type,
+  parser_e_wrong_parameter_size,
   parser_e_overloaded_no_procedure,
   parser_e_overloaded_no_procedure,
   parser_e_overloaded_have_same_parameters,
   parser_e_overloaded_have_same_parameters,
   parser_e_header_dont_match_forward,
   parser_e_header_dont_match_forward,
@@ -77,8 +78,6 @@ type tmsgconst=(
   parser_n_interface_name_diff_implementation_name,
   parser_n_interface_name_diff_implementation_name,
   parser_e_too_much_lexlevel,
   parser_e_too_much_lexlevel,
   parser_e_range_check_error,
   parser_e_range_check_error,
-  parser_e_pointer_type_expected,
-  parser_e_class_type_expected,
   parser_e_double_caselabel,
   parser_e_double_caselabel,
   parser_e_type_const_not_possible,
   parser_e_type_const_not_possible,
   parser_e_no_overloaded_procvars,
   parser_e_no_overloaded_procvars,
@@ -91,7 +90,6 @@ type tmsgconst=(
   parser_e_error_in_real,
   parser_e_error_in_real,
   parser_e_fail_only_in_constructor,
   parser_e_fail_only_in_constructor,
   parser_e_no_paras_for_destructor,
   parser_e_no_paras_for_destructor,
-  parser_e_strict_var_string_violation,
   parser_e_only_class_methods_via_class_ref,
   parser_e_only_class_methods_via_class_ref,
   parser_e_only_class_methods,
   parser_e_only_class_methods,
   parser_e_case_mismatch,
   parser_e_case_mismatch,
@@ -115,15 +113,11 @@ type tmsgconst=(
   parser_e_pointer_to_class_expected,
   parser_e_pointer_to_class_expected,
   parser_e_expr_have_to_be_constructor_call,
   parser_e_expr_have_to_be_constructor_call,
   parser_e_expr_have_to_be_destructor_call,
   parser_e_expr_have_to_be_destructor_call,
-  parser_e_typeconflict_in_set,
-  parser_w_use_int_div_int_op,
   parser_e_invalid_record_const,
   parser_e_invalid_record_const,
   parser_e_false_with_expr,
   parser_e_false_with_expr,
   parser_e_void_function,
   parser_e_void_function,
   parser_e_constructors_always_objects,
   parser_e_constructors_always_objects,
-  parser_w_convert_real_2_comp,
   parser_e_operator_not_overloaded,
   parser_e_operator_not_overloaded,
-  parser_e_varid_or_typeid_expected,
   parser_e_no_reraise_possible,
   parser_e_no_reraise_possible,
   parser_e_no_new_or_dispose_for_classes,
   parser_e_no_new_or_dispose_for_classes,
   parser_e_asm_incomp_with_function_return,
   parser_e_asm_incomp_with_function_return,
@@ -138,7 +132,6 @@ type tmsgconst=(
   parser_e_absolute_only_to_var_or_const,
   parser_e_absolute_only_to_var_or_const,
   parser_e_abstract_no_definition,
   parser_e_abstract_no_definition,
   parser_e_overloaded_must_be_all_global,
   parser_e_overloaded_must_be_all_global,
-  parser_e_succ_and_pred_enums_with_assign_not_possible,
   parser_w_virtual_without_constructor,
   parser_w_virtual_without_constructor,
   parser_m_macro_defined,
   parser_m_macro_defined,
   parser_m_macro_undefined,
   parser_m_macro_undefined,
@@ -152,7 +145,7 @@ type tmsgconst=(
   parser_e_constructor_cannot_be_not_virtual,
   parser_e_constructor_cannot_be_not_virtual,
   parser_e_no_default_property_available,
   parser_e_no_default_property_available,
   parser_e_cant_have_published,
   parser_e_cant_have_published,
-  parser_forward_declaration_must_be_resolved,
+  parser_e_forward_declaration_must_be_resolved,
   parser_e_no_local_operator,
   parser_e_no_local_operator,
   parser_e_proc_dir_not_allowed_in_interface,
   parser_e_proc_dir_not_allowed_in_interface,
   parser_e_proc_dir_not_allowed_in_implementation,
   parser_e_proc_dir_not_allowed_in_implementation,
@@ -165,15 +158,32 @@ type tmsgconst=(
   parser_i_writing_browser_log,
   parser_i_writing_browser_log,
   parser_h_maybe_deref_caret_missing,
   parser_h_maybe_deref_caret_missing,
   parser_f_assembler_reader_not_supported,
   parser_f_assembler_reader_not_supported,
-  sym_n_local_var_not_init_yet,
+  parser_e_proc_dir_conflict,
+  parser_e_call_convention_dont_match_forward,
+  parser_e_register_calling_not_supported,
+  type_e_mismatch,
+  type_e_integer_expr_expected,
+  type_e_ordinal_expr_expected,
+  type_e_type_id_expected,
+  type_e_variable_id_expected,
+  type_e_pointer_type_expected,
+  type_e_class_type_expected,
+  type_e_varid_or_typeid_expected,
+  type_e_cant_eval_constant_expr,
+  type_e_set_element_are_not_comp,
+  type_w_convert_real_2_comp,
+  type_w_int_slash_int,
+  type_h_use_div_for_int,
+  type_e_strict_var_string_violation,
+  type_e_succ_and_pred_enums_with_assign_not_possible,
+  type_e_cant_read_write_type,
+  type_e_typeconflict_in_set,
   sym_e_id_not_found,
   sym_e_id_not_found,
   sym_f_internal_error_in_symtablestack,
   sym_f_internal_error_in_symtablestack,
   sym_e_duplicate_id,
   sym_e_duplicate_id,
   sym_e_unknown_id,
   sym_e_unknown_id,
   sym_e_forward_not_resolved,
   sym_e_forward_not_resolved,
   sym_f_id_already_typed,
   sym_f_id_already_typed,
-  sym_e_type_id_expected,
-  sym_e_type_mismatch,
   sym_e_error_in_type_def,
   sym_e_error_in_type_def,
   sym_e_type_id_not_defined,
   sym_e_type_id_not_defined,
   sym_e_only_static_in_static,
   sym_e_only_static_in_static,
@@ -190,7 +200,6 @@ type tmsgconst=(
   sym_e_class_forward_not_resolved,
   sym_e_class_forward_not_resolved,
   sym_n_para_identifier_not_used,
   sym_n_para_identifier_not_used,
   sym_w_local_identifier_not_used,
   sym_w_local_identifier_not_used,
-  sym_e_set_element_are_not_comp,
   sym_e_set_expected,
   sym_e_set_expected,
   sym_w_function_result_not_set,
   sym_w_function_result_not_set,
   sym_e_illegal_field,
   sym_e_illegal_field,
@@ -438,6 +447,7 @@ type tmsgconst=(
   option_info_end,
   option_info_end,
   ol_begin,
   ol_begin,
   ol001,
   ol001,
+  ol120,
   ol002,
   ol002,
   ol003,
   ol003,
   ol004,
   ol004,

+ 173 - 165
compiler/msgtxt.inc

@@ -1,4 +1,4 @@
-const msgtxt : array[0..00084,1..240] of char=(+
+const msgtxt : array[0..00086,1..240] of char=(+
   'U_Compiler: $1'#000+
   'U_Compiler: $1'#000+
   'D_Source OS: $1'#000+
   'D_Source OS: $1'#000+
   'I_Target OS: $1'#000+
   'I_Target OS: $1'#000+
@@ -69,337 +69,345 @@ const msgtxt : array[0..00084,1..240] of char=(+
   'N_Class should have one destructor only'#000+
   'N_Class should have one destructor only'#000+
   'E_Local class definitions are not allowed'#000+
   'E_Local class definitions are not allowed'#000+
   'E_Anonym class definitions are not allowed'#000+
   'E_Anonym class definitions are not allowed'#000+
-  'E_Ordinal value expected'#000+
-  'E','_Illegal parameter list'#000+
+  'E_Illegal parameter list'#000+
+  'E','_Wrong parameter type specified'#000+
+  'E_Wrong amount of parameters specified'#000+
   'E_overloaded identifier isn'#039't a function identifier'#000+
   'E_overloaded identifier isn'#039't a function identifier'#000+
   'E_overloaded functions have the same parameter list'#000+
   'E_overloaded functions have the same parameter list'#000+
   'E_function header doesn'#039't match the forward declaration $1'#000+
   'E_function header doesn'#039't match the forward declaration $1'#000+
-  'N_only values can be jumped over in enumeration types',#000+
+  'N_only',' values can be jumped over in enumeration types'#000+
   'N_Interface and implementation names are different !'#000+
   'N_Interface and implementation names are different !'#000+
   'E_function nesting > 31'#000+
   'E_function nesting > 31'#000+
   'E_range check error while evaluating constants'#000+
   'E_range check error while evaluating constants'#000+
-  'E_pointer type expected'#000+
-  'E_class type expected'#000+
   'E_duplicate case label'#000+
   'E_duplicate case label'#000+
-  'E_typed constants of classes are not allowed'#000+
-  'E','_functions variables of overloaded functions are not allowed'#000+
+  'E_typed constants of classes are not allowed'#000,+
+  'E_functions variables of overloaded functions are not allowed'#000+
   'E_string length must be a value from 1 to 255'#000+
   'E_string length must be a value from 1 to 255'#000+
   'W_use extended syntax of DISPOSE and NEW to generate instances of obje'+
   'W_use extended syntax of DISPOSE and NEW to generate instances of obje'+
   'cts'#000+
   'cts'#000+
   'E_class identifier expected'#000+
   'E_class identifier expected'#000+
   'E_method identifier expected'#000+
   'E_method identifier expected'#000+
-  'E_','function header doesn'#039't match any method of this class'#000+
+  'E','_function header doesn'#039't match any method of this class'#000+
   'P_procedure/function $1'#000+
   'P_procedure/function $1'#000+
   'E_Illegal floating point constant'#000+
   'E_Illegal floating point constant'#000+
   'E_FAIL can be used in constructors only'#000+
   'E_FAIL can be used in constructors only'#000+
   'E_Destructors can'#039't have parameters'#000+
   'E_Destructors can'#039't have parameters'#000+
-  'E_string types doesn'#039't match, because of $V+ mode'#000+
-  'E','_Only class methods can be referred with class references'#000+
+  'E_Only class methods can be referred with class re','ferences'#000+
   'E_Only class methods can be accessed in class methods'#000+
   'E_Only class methods can be accessed in class methods'#000+
   'E_Constant and CASE types do not match'#000+
   'E_Constant and CASE types do not match'#000+
   'E_The symbol can'#039't be exported from a library'#000+
   'E_The symbol can'#039't be exported from a library'#000+
   'W_A inherited method is hidden by $1'#000+
   'W_A inherited method is hidden by $1'#000+
-  'E_Ther','e is no method in an ancestor class to be overridden: $1'#000+
+  'E_There is no method in an ancestor class to be overrid','den: $1'#000+
   'E_No member is provided to access property'#000+
   'E_No member is provided to access property'#000+
   'E_Illegal symbol for property access'#000+
   'E_Illegal symbol for property access'#000+
   'E_Cannot access a protected field of an object here'#000+
   'E_Cannot access a protected field of an object here'#000+
   'E_Cannot access a private field of an object here'#000+
   'E_Cannot access a private field of an object here'#000+
-  'E','_all overloaded methods must be virtual if one is virtual: $1'#000+
+  'E_all overloaded methods must be virtual if one is',' virtual: $1'#000+
   'E_overloaded methods which are virtual must have the same return type:'+
   'E_overloaded methods which are virtual must have the same return type:'+
   ' $1'#000+
   ' $1'#000+
   'E_EXPORT declared functions can'#039't be nested'#000+
   'E_EXPORT declared functions can'#039't be nested'#000+
   'E_methods can'#039't be EXPORTed'#000+
   'E_methods can'#039't be EXPORTed'#000+
-  'E_call by var parameters have to',' match exactly'#000+
-  'E_Class isn'#039't a super class of the current class'#000+
+  'E_call by var parameters have to match exactly'#000+
+  'E_Class isn'#039't a super class of the',' current class'#000+
   'E_SELF is only allowed in methods'#000+
   'E_SELF is only allowed in methods'#000+
   'E_methods can be only in other methods called direct with type identif'+
   'E_methods can be only in other methods called direct with type identif'+
   'ier of the class'#000+
   'ier of the class'#000+
   'E_Illegal use of '#039':'#039#000+
   'E_Illegal use of '#039':'#039#000+
-  'E_range check error in set constru','ctor or duplicate set element'#000+
-  'E_Pointer to class expected'#000+
+  'E_range check error in set constructor or duplicate set element'#000+
+  'E_Pointer to class ','expected'#000+
   'E_Expression must be constructor call'#000+
   'E_Expression must be constructor call'#000+
   'E_Expression must be destructor call'#000+
   'E_Expression must be destructor call'#000+
-  'E_Type conflict between set elements'#000+
-  'W_Using / will give a floating point result, use DIV instead to get an',+
-  ' integer result'#000+
   'E_Illegal order of record elements'#000+
   'E_Illegal order of record elements'#000+
   'E_Expression type must by class or record type'#000+
   'E_Expression type must by class or record type'#000+
   'E_Functions with void return value can'#039't return any value'#000+
   'E_Functions with void return value can'#039't return any value'#000+
-  'E_constructors and destructors must be methods'#000+
-  'W_Automatic type conversion from floa','ting type to COMP which is an i'+
-  'nteger type'#000+
+  'E_constructors a','nd destructors must be methods'#000+
   'E_Operator is not overloaded'#000+
   'E_Operator is not overloaded'#000+
-  'E_Variable or type indentifier expected'#000+
   'E_Re-raise isn'#039't possible there'#000+
   'E_Re-raise isn'#039't possible there'#000+
   'E_The extended syntax of new or dispose isn'#039't allowed for a class'#000+
   'E_The extended syntax of new or dispose isn'#039't allowed for a class'#000+
-  'E_Assembler incompatible with ','function return value'#000+
-  'E_Procedure overloading is switched off'#000+
+  'E_Assembler incompatible with function return value'#000+
+  'E_Procedure overloading is swi','tched off'#000+
   'E_It is not possible to overload this operator (overload = instead)'#000+
   'E_It is not possible to overload this operator (overload = instead)'#000+
   'E_Comparative operator must return a boolean value'#000+
   'E_Comparative operator must return a boolean value'#000+
   'E_Only virtual methods can be abstract'#000+
   'E_Only virtual methods can be abstract'#000+
-  'F_Use of unsupported',' feature!'#000+
-  'E_The mix of CLASSES and OBJECTS isn'#039't allowed'#000+
+  'F_Use of unsupported feature!'#000+
+  'E_The mix of CLASSES and OBJECTS isn'#039't all','owed'#000+
   'W_Unknown procedure directive had to be ignored: $1'#000+
   'W_Unknown procedure directive had to be ignored: $1'#000+
   'E_absolute can only be associated to ONE variable'#000+
   'E_absolute can only be associated to ONE variable'#000+
   'E_absolute can only be associated a var or const'#000+
   'E_absolute can only be associated a var or const'#000+
-  'E_Abtract methods shouldn'#039't have',' any definition (with function b'+
-  'ody)'#000+
-  'E_This overloaded function can'#039't be local (must be exported)'#000+
-  'E_succ or pred on enums with assignments not possible'#000+
+  'E_Abtract methods shouldn'#039't have any definition (with function bod'+
+  'y)'#000+
+  'E_This overload','ed function can'#039't be local (must be exported)'#000+
   'W_Virtual methods are used without a constructor in $1'#000+
   'W_Virtual methods are used without a constructor in $1'#000+
   'M_Macro defined: $1'#000+
   'M_Macro defined: $1'#000+
-  'M_Macro undef','ined: $1'#000+
+  'M_Macro undefined: $1'#000+
   'M_Macro $1 set to $2'#000+
   'M_Macro $1 set to $2'#000+
   'I_Compiling $1'#000+
   'I_Compiling $1'#000+
   'D_Compiling $1 for the second time'#000+
   'D_Compiling $1 for the second time'#000+
-  'E_Array properties aren'#039't allowed at this point'#000+
+  'E_Array properties aren'#039't ','allowed at this point'#000+
   'E_No property found to override'#000+
   'E_No property found to override'#000+
   'E_Only one default property is allowed, found inherited default proper'+
   'E_Only one default property is allowed, found inherited default proper'+
-  'ty in clas','s %1'#000+
+  'ty in class %1'#000+
   'E_The default property must be an array property'#000+
   'E_The default property must be an array property'#000+
-  'E_Virtual constructors are only supported in class object model'#000+
+  'E_Virtual constructors are only supported in class o','bject model'#000+
   'E_No default property available'#000+
   'E_No default property available'#000+
   'E_The class can'#039't have a published section, use the {$M+} switch'#000+
   'E_The class can'#039't have a published section, use the {$M+} switch'#000+
-  'E_Forward declaration of ','class $1 must be resolved here to use the c'+
-  'lass as anchestor'#000+
+  'E_Forward declaration of class $1 must be resolved here to use the cla'+
+  'ss as anchestor'#000+
   'E_Local operators not supported'#000+
   'E_Local operators not supported'#000+
-  'E_Procedure directive $1 not allowed in interface section'#000+
+  'E_Procedure d','irective $1 not allowed in interface section'#000+
   'E_Procedure directive $1 not allowed in implementation section'#000+
   'E_Procedure directive $1 not allowed in implementation section'#000+
-  'E_Procedure directive $1 n','ot allowed in procvar declaration'#000+
+  'E_Procedure directive $1 not allowed in procvar declaration'#000+
   'E_Function is already declared Public/Forward $1'#000+
   'E_Function is already declared Public/Forward $1'#000+
-  'E_Can'#039't use both EXPORT and EXTERNAL'#000+
+  'E_Can'#039't use both EXPORT',' and EXTERNAL'#000+
   'E_NAME keyword expected'#000+
   'E_NAME keyword expected'#000+
   'W_$1 not yet supported inside inline procedure/function'#000+
   'W_$1 not yet supported inside inline procedure/function'#000+
   'W_Inlining disabled'#000+
   'W_Inlining disabled'#000+
-  'I_Writing Browser lo','g $1'#000+
+  'I_Writing Browser log $1'#000+
   'H_may be pointer deref ^ is missing'#000+
   'H_may be pointer deref ^ is missing'#000+
   'F_Selected assembler reader not supported'#000+
   'F_Selected assembler reader not supported'#000+
-  'W_Local variable $1 doesn'#039't seem to be initialized yet !'#000+
+  'E_Procedure directive $','1 has conflicts with other directives'#000+
+  'E_Calling convention doesn'#039't match forward'#000+
+  'E_Register calling (fastcall) not supported'#000+
+  'E_Type mismatch'#000+
+  'E_Integer expression expected'#000+
+  'E_Ordinal expression expected'#000+
+  'E_Type identifier expected'#000+
+  'E_Variable i','dentifier expected'#000+
+  'E_pointer type expected'#000+
+  'E_class type expected'#000+
+  'E_Variable or type indentifier expected'#000+
+  'E_Can'#039't evaluate constant expression'#000+
+  'E_Set elements are not compatible'#000+
+  'W_Automatic type conversion from floating type to COMP which is ','an i'+
+  'nteger type'#000+
+  'W_Using / will give a floating point result'#000+
+  'use DIV instead to get an integer result'#000+
+  'E_string types doesn'#039't match, because of $V+ mode'#000+
+  'E_succ or pred on enums with assignments not possible'#000+
+  'E_Can'#039't read or write variables of ','this type'#000+
+  'E_Type conflict between set elements'#000+
   'E_Identifier not found $1'#000+
   'E_Identifier not found $1'#000+
   'F_Internal Error in SymTableStack()'#000+
   'F_Internal Error in SymTableStack()'#000+
   'E_Duplicate identifier $1'#000+
   'E_Duplicate identifier $1'#000+
-  'E_Unknown id','entifier $1'#000+
+  'E_Unknown identifier $1'#000+
   'E_Forward declaration not solved: $1'#000+
   'E_Forward declaration not solved: $1'#000+
   'F_Identifier type already defined as type'#000+
   'F_Identifier type already defined as type'#000+
-  'E_Type identifier expected'#000+
-  'E_Type mismatch'#000+
-  'E_Error in type defenition'#000+
+  'E_','Error in type defenition'#000+
   'E_Type identifier not defined'#000+
   'E_Type identifier not defined'#000+
-  'E_Only static variables can be used in static met','hods or outside met'+
-  'hods'#000+
+  'E_Only static variables can be used in static methods or outside metho'+
+  'ds'#000+
   'E_Invalid call to tvarsym.mangledname()'#000+
   'E_Invalid call to tvarsym.mangledname()'#000+
   'F_record or class type expected'#000+
   'F_record or class type expected'#000+
-  'E_To generate an instance of a class or an object with an abtract meth'+
-  'od isn'#039't allowed'#000+
+  'E_To generate an instance of a class or ','an object with an abtract me'+
+  'thod isn'#039't allowed'#000+
   'E_Label not defined $1'#000+
   'E_Label not defined $1'#000+
   'E_Illegal label declaration'#000+
   'E_Illegal label declaration'#000+
-  'E_GOTO',' und LABEL are not supported (use command line switch -Sg)'#000+
+  'E_GOTO und LABEL are not supported (use command line switch -Sg)'#000+
   'E_Label not found'#000+
   'E_Label not found'#000+
   'E_identifier isn'#039't a label'#000+
   'E_identifier isn'#039't a label'#000+
   'E_label already defined'#000+
   'E_label already defined'#000+
-  'E_illegal type declaration of set elements'#000+
+  'E_illega','l type declaration of set elements'#000+
   'E_Forward class definition not resolved $1'#000+
   'E_Forward class definition not resolved $1'#000+
   'H_Parameter not used $1'#000+
   'H_Parameter not used $1'#000+
-  'W_','Local variable not used $1'#000+
-  'E_Set elements are not compatible'#000+
+  'W_Local variable not used $1'#000+
   'E_Set type expected'#000+
   'E_Set type expected'#000+
   'W_Function result does not seem to be set'#000+
   'W_Function result does not seem to be set'#000+
   'E_Unknown field identifier'#000+
   'E_Unknown field identifier'#000+
-  'W_Local variable $1 does not seem to be initialized'#000+
+  'W_Local variable $1 ','does not seem to be initialized'#000+
   'E_identifier idents no member $1'#000+
   'E_identifier idents no member $1'#000+
-  'E_BRE','AK not allowed'#000+
+  'E_BREAK not allowed'#000+
   'E_CONTINUE not allowed'#000+
   'E_CONTINUE not allowed'#000+
   'E_Expression too complicated - FPU stack overflow'#000+
   'E_Expression too complicated - FPU stack overflow'#000+
   'E_Illegal expression'#000+
   'E_Illegal expression'#000+
   'E_Invalid integer'#000+
   'E_Invalid integer'#000+
   'E_Illegal qualifier'#000+
   'E_Illegal qualifier'#000+
-  'E_High range limit < low range limit'#000+
+  'E_High range limit < lo','w range limit'#000+
   'E_Illegal counter variable'#000+
   'E_Illegal counter variable'#000+
-  'E_Can'#039't determine which overl','oaded function to call'#000+
+  'E_Can'#039't determine which overloaded function to call'#000+
   'E_Parameter list size exceeds 65535 bytes'#000+
   'E_Parameter list size exceeds 65535 bytes'#000+
   'E_Illegal type conversion'#000+
   'E_Illegal type conversion'#000+
   'E_File types must be var parameters'#000+
   'E_File types must be var parameters'#000+
-  'E_The use of a far pointer isn'#039't allowed there'#000+
+  'E_The use of a far pointer isn'#039't allowed th','ere'#000+
   'E_illegal call by reference parameters'#000+
   'E_illegal call by reference parameters'#000+
-  'E_EXPORT declared functions',' can'#039't be called'#000+
+  'E_EXPORT declared functions can'#039't be called'#000+
   'W_Possible illegal call of constructor or destructor (doesn'#039't matc'+
   'W_Possible illegal call of constructor or destructor (doesn'#039't matc'+
   'h to this context)'#000+
   'h to this context)'#000+
   'N_Inefficient code'#000+
   'N_Inefficient code'#000+
   'W_unreachable code'#000+
   'W_unreachable code'#000+
-  'E_procedure call with stackframe ESP/SP'#000+
+  'E_procedure call with stackfra','me ESP/SP'#000+
   'E_Abstract methods can'#039't be called directly'#000+
   'E_Abstract methods can'#039't be called directly'#000+
-  'F_Internal Error',' in getfloatreg(), allocation failure'#000+
+  'F_Internal Error in getfloatreg(), allocation failure'#000+
   'F_Unknown float type'#000+
   'F_Unknown float type'#000+
   'F_SecondVecn() base defined twice'#000+
   'F_SecondVecn() base defined twice'#000+
   'F_Extended cg68k not supported'#000+
   'F_Extended cg68k not supported'#000+
-  'F_32-bit unsigned not supported in MC68000 mode'#000+
+  'F_32-bit unsigned not supported in MC68000 mod','e'#000+
   'F_Internal Error in secondinline()'#000+
   'F_Internal Error in secondinline()'#000+
   'D_Register $1 weight $2 $3'#000+
   'D_Register $1 weight $2 $3'#000+
-  'E_Stac','k limit excedeed in local routine'#000+
+  'E_Stack limit excedeed in local routine'#000+
   'D_Stack frame is omited'#000+
   'D_Stack frame is omited'#000+
   'E_Unable to inline object methods'#000+
   'E_Unable to inline object methods'#000+
   'E_Unable to inline procvar calls'#000+
   'E_Unable to inline procvar calls'#000+
   'E_No code for inline procedure stored'#000+
   'E_No code for inline procedure stored'#000+
-  'F_Divide by zero in asm evaluator'#000+
+  'F_Divid','e by zero in asm evaluator'#000+
   'F_Evaluator stack overflow'#000+
   'F_Evaluator stack overflow'#000+
-  'F_Evaluator stac','k underflow'#000+
+  'F_Evaluator stack underflow'#000+
   'F_Invalid numeric format in asm evaluator'#000+
   'F_Invalid numeric format in asm evaluator'#000+
   'F_Invalid Operator in asm evaluator'#000+
   'F_Invalid Operator in asm evaluator'#000+
   'F_Unknown error in asm evaluator'#000+
   'F_Unknown error in asm evaluator'#000+
   'W_Invalid numeric value'#000+
   'W_Invalid numeric value'#000+
-  'E_escape sequence ignored: $1'#000+
+  'E_escape sequence ignor','ed: $1'#000+
   'E_Asm syntax error - Prefix not found'#000+
   'E_Asm syntax error - Prefix not found'#000+
-  'E_Asm syntax error - Tryi','ng to add more than one prefix'#000+
+  'E_Asm syntax error - Trying to add more than one prefix'#000+
   'E_Asm syntax error - Opcode not found'#000+
   'E_Asm syntax error - Opcode not found'#000+
   'E_Invalid symbol reference'#000+
   'E_Invalid symbol reference'#000+
   'W_Calling an overload function in an asm'#000+
   'W_Calling an overload function in an asm'#000+
   'E_Constant value out of bounds'#000+
   'E_Constant value out of bounds'#000+
-  'E_Non-label pattern contains @'#000+
+  'E_','Non-label pattern contains @'#000+
   'E_Invalid Operand: $1'#000+
   'E_Invalid Operand: $1'#000+
-  'W_Override operator',' not supported'#000+
+  'W_Override operator not supported'#000+
   'E_Error in binary constant: $1'#000+
   'E_Error in binary constant: $1'#000+
   'E_Error in octal constant: $1'#000+
   'E_Error in octal constant: $1'#000+
   'E_Error in hexadecimal constant: $1'#000+
   'E_Error in hexadecimal constant: $1'#000+
   'E_Error in integer constant: $1'#000+
   'E_Error in integer constant: $1'#000+
   'E_Invalid labeled opcode'#000+
   'E_Invalid labeled opcode'#000+
-  'F_Internal error in Findtype()'#000+
+  'F','_Internal error in Findtype()'#000+
   'E_Invalid size for MOVSX/MOVZX'#000+
   'E_Invalid size for MOVSX/MOVZX'#000+
-  'E_16-bit ','base in 32-bit segment'#000+
+  'E_16-bit base in 32-bit segment'#000+
   'E_16-bit index in 32-bit segment'#000+
   'E_16-bit index in 32-bit segment'#000+
   'E_Invalid Opcode'#000+
   'E_Invalid Opcode'#000+
   'E_Constant reference not allowed'#000+
   'E_Constant reference not allowed'#000+
   'W_Fwait can cause emulation problems with emu387'#000+
   'W_Fwait can cause emulation problems with emu387'#000+
-  'E_Invalid combination of opcode and operands'#000+
-  'W_Opcode $1 not in table, operands not c','hecked'#000+
+  'E_Invalid combi','nation of opcode and operands'#000+
+  'W_Opcode $1 not in table, operands not checked'#000+
   'F_Internal Error in ConcatOpcode()'#000+
   'F_Internal Error in ConcatOpcode()'#000+
   'E_Invalid size in reference'#000+
   'E_Invalid size in reference'#000+
   'E_Invalid middle sized operand'#000+
   'E_Invalid middle sized operand'#000+
   'E_Invalid three operand opcode'#000+
   'E_Invalid three operand opcode'#000+
   'E_Assembler syntax error'#000+
   'E_Assembler syntax error'#000+
-  'E_Invalid operand type'#000+
+  'E_Invalid ope','rand type'#000+
   'E_Segment overrides not supported'#000+
   'E_Segment overrides not supported'#000+
-  'E_Invalid constant symbol ','$1'#000+
+  'E_Invalid constant symbol $1'#000+
   'F_Internal Errror converting binary'#000+
   'F_Internal Errror converting binary'#000+
   'F_Internal Errror converting hexadecimal'#000+
   'F_Internal Errror converting hexadecimal'#000+
   'F_Internal Errror converting octal'#000+
   'F_Internal Errror converting octal'#000+
   'E_Invalid constant expression'#000+
   'E_Invalid constant expression'#000+
-  'E_Unknown identifier: $1'#000+
+  'E_Unknown identifier: $1'#000,+
   'E_Trying to define an index register more than once'#000+
   'E_Trying to define an index register more than once'#000+
-  'E_Invalid field sp','ecifier'#000+
+  'E_Invalid field specifier'#000+
   'F_Internal Error in BuildScaling()'#000+
   'F_Internal Error in BuildScaling()'#000+
   'E_Invalid scaling factor'#000+
   'E_Invalid scaling factor'#000+
   'E_Invalid scaling value'#000+
   'E_Invalid scaling value'#000+
   'E_Scaling value only allowed with index'#000+
   'E_Scaling value only allowed with index'#000+
-  'E_Invalid assembler syntax. No ref with brackets)'#000+
-  'E_Expressions of the form [sreg:reg...] are currently not ','supported'#000+
+  'E_Invalid assembler syntax. No ref wit','h brackets)'#000+
+  'E_Expressions of the form [sreg:reg...] are currently not supported'#000+
   'E_Trying to define a segment register twice'#000+
   'E_Trying to define a segment register twice'#000+
   'E_Trying to define a base register twice'#000+
   'E_Trying to define a base register twice'#000+
   'E_Trying to use a negative index register'#000+
   'E_Trying to use a negative index register'#000+
-  'E_Asm syntax error - error in reference'#000+
+  'E_Asm syntax error - error in ref','erence'#000+
   'E_Local symbols not allowed as references'#000+
   'E_Local symbols not allowed as references'#000+
-  'E_Invalid operand in ','bracket expression'#000+
+  'E_Invalid operand in bracket expression'#000+
   'E_Invalid symbol name: $1'#000+
   'E_Invalid symbol name: $1'#000+
   'E_Invalid Reference syntax'#000+
   'E_Invalid Reference syntax'#000+
   'E_Invalid string as opcode operand: $1'#000+
   'E_Invalid string as opcode operand: $1'#000+
   'W_@CODE and @DATA not supported'#000+
   'W_@CODE and @DATA not supported'#000+
-  'E_Null label references are not allowed'#000+
+  'E_Null label references are',' not allowed'#000+
   'E_Cannot use SELF outside a method'#000+
   'E_Cannot use SELF outside a method'#000+
-  'E_Asm syntax error - S','hould start with bracket'#000+
+  'E_Asm syntax error - Should start with bracket'#000+
   'E_Asm syntax error - register: $1'#000+
   'E_Asm syntax error - register: $1'#000+
   'E_SEG and OFFSET not supported'#000+
   'E_SEG and OFFSET not supported'#000+
   'E_Asm syntax error - in opcode operand'#000+
   'E_Asm syntax error - in opcode operand'#000+
   'E_Invalid String expression'#000+
   'E_Invalid String expression'#000+
-  'E_Constant expression out of bounds'#000+
+  'E_Constant ex','pression out of bounds'#000+
   'F_Internal Error in BuildConstant()'#000+
   'F_Internal Error in BuildConstant()'#000+
-  'W_A repeat ','prefix and a segment override on <= i386 may result in er'+
-  'rors if an interrupt occurs'#000+
+  'W_A repeat prefix and a segment override on <= i386 may result in erro'+
+  'rs if an interrupt occurs'#000+
   'E_Invalid or missing opcode'#000+
   'E_Invalid or missing opcode'#000+
   'E_Invalid combination of prefix and opcode: $1'#000+
   'E_Invalid combination of prefix and opcode: $1'#000+
-  'E_Invalid combination of override and opcode: $1'#000+
+  'E_Invalid ','combination of override and opcode: $1'#000+
   'E_Too many operands on line'#000+
   'E_Too many operands on line'#000+
-  'E_D','uplicate local symbol: $1'#000+
+  'E_Duplicate local symbol: $1'#000+
   'E_Unknown label identifer: $1'#000+
   'E_Unknown label identifer: $1'#000+
   'E_Assemble node syntax error'#000+
   'E_Assemble node syntax error'#000+
   'E_Undefined local symbol: $1'#000+
   'E_Undefined local symbol: $1'#000+
   'D_Starting intel styled assembler parsing...'#000+
   'D_Starting intel styled assembler parsing...'#000+
-  'D_Finished intel styled assembler parsing...'#000+
-  'E_Not a directive or local symbol: $','1'#000+
+  'D_Finished ','intel styled assembler parsing...'#000+
+  'E_Not a directive or local symbol: $1'#000+
   'E_/ at beginning of line not allowed'#000+
   'E_/ at beginning of line not allowed'#000+
   'E_NOR not supported'#000+
   'E_NOR not supported'#000+
   'E_Invalid floating point register name'#000+
   'E_Invalid floating point register name'#000+
   'W_Modulo not supported'#000+
   'W_Modulo not supported'#000+
   'E_Invalid floating point constant: $1'#000+
   'E_Invalid floating point constant: $1'#000+
-  'E_Size suffix and destination register do not match'#000+
-  'E_Internal error in ConcatLab','eledInstr()'#000+
+  'E_Size suff','ix and destination register do not match'#000+
+  'E_Internal error in ConcatLabeledInstr()'#000+
   'W_Floating point binary representation ignored'#000+
   'W_Floating point binary representation ignored'#000+
   'W_Floating point hexadecimal representation ignored'#000+
   'W_Floating point hexadecimal representation ignored'#000+
   'W_Floating point octal representation ignored'#000+
   'W_Floating point octal representation ignored'#000+
-  'E_Invalid real constant expression'#000+
+  'E_Invalid rea','l constant expression'#000+
   'E_Parenthesis are not allowed'#000+
   'E_Parenthesis are not allowed'#000+
-  'E_Invalid Referenc','e'#000+
+  'E_Invalid Reference'#000+
   'E_Cannot use __SELF outside a method'#000+
   'E_Cannot use __SELF outside a method'#000+
   'E_Cannot use __OLDEBP outside a nested procedure'#000+
   'E_Cannot use __OLDEBP outside a nested procedure'#000+
   'W_Identifier $1 supposed external'#000+
   'W_Identifier $1 supposed external'#000+
   'E_Invalid segment override expression'#000+
   'E_Invalid segment override expression'#000+
-  'E_Strings not allowed as constants'#000+
+  'E_Strings ','not allowed as constants'#000+
   'D_Starting AT&T styled assembler parsing...'#000+
   'D_Starting AT&T styled assembler parsing...'#000+
-  'D','_Finished AT&T styled assembler parsing...'#000+
+  'D_Finished AT&T styled assembler parsing...'#000+
   'E_Switching sections is not allowed in an assembler block'#000+
   'E_Switching sections is not allowed in an assembler block'#000+
   'E_Invalid global definition'#000+
   'E_Invalid global definition'#000+
   'E_Line separator expected'#000+
   'E_Line separator expected'#000+
-  'W_globl not supported'#000+
+  'W_globl not sup','ported'#000+
   'W_align not supported'#000+
   'W_align not supported'#000+
   'W_lcomm not supported'#000+
   'W_lcomm not supported'#000+
-  'W_comm not supporte','d'#000+
+  'W_comm not supported'#000+
   'E_Invalid local common definition'#000+
   'E_Invalid local common definition'#000+
   'E_Invalid global common definition'#000+
   'E_Invalid global common definition'#000+
   'E_local symbol: $1 not found inside asm statement'#000+
   'E_local symbol: $1 not found inside asm statement'#000+
   'E_assembler code not returned to text'#000+
   'E_assembler code not returned to text'#000+
-  'F_internal error in BuildReference()'#000+
+  'F_internal ','error in BuildReference()'#000+
   'E_invalid opcode size'#000+
   'E_invalid opcode size'#000+
   'W_NEAR ignored'#000+
   'W_NEAR ignored'#000+
-  'W_FAR i','gnored'#000+
+  'W_FAR ignored'#000+
   'D_Creating inline asm lookup tables'#000+
   'D_Creating inline asm lookup tables'#000+
   'W_Using a defined name as a local label'#000+
   'W_Using a defined name as a local label'#000+
   'F_internal error in HandleExtend()'#000+
   'F_internal error in HandleExtend()'#000+
   'E_Invalid character: <'#000+
   'E_Invalid character: <'#000+
   'E_Invalid character: >'#000+
   'E_Invalid character: >'#000+
-  'E_Unsupported opcode'#000+
+  'E_Unsu','pported opcode'#000+
   'E_Increment and Decrement mode not allowed together'#000+
   'E_Increment and Decrement mode not allowed together'#000+
-  'E_I','nvalid Register list in movem/fmovem'#000+
+  'E_Invalid Register list in movem/fmovem'#000+
   'E_Invalid Register list for opcode'#000+
   'E_Invalid Register list for opcode'#000+
   'E_68020+ mode required to assemble'#000+
   'E_68020+ mode required to assemble'#000+
   'D_Starting Motorola styled assembler parsing...'#000+
   'D_Starting Motorola styled assembler parsing...'#000+
-  'D_Finished Motorola styled assembler parsing...'#000+
+  'D_Finished Moto','rola styled assembler parsing...'#000+
   'W_XDEF not supported'#000+
   'W_XDEF not supported'#000+
-  'W_Functions with',' void return value can'#039't return any value in asm'+
-  ' code'#000+
+  'W_Functions with void return value can'#039't return any value in asm c'+
+  'ode'#000+
   'E_Invalid suffix for intel assembler'#000+
   'E_Invalid suffix for intel assembler'#000+
   'E_Extended not supported in this mode'#000+
   'E_Extended not supported in this mode'#000+
   'E_Comp not supported in this mode'#000+
   'E_Comp not supported in this mode'#000+
-  'W_You need GNU as version >= 2.81 to compile this MMX code'#000+
-  'F_Too many assembl','er files'#000+
+  'W_You n','eed GNU as version >= 2.81 to compile this MMX code'#000+
+  'F_Too many assembler files'#000+
   'F_Selected assembler output not supported'#000+
   'F_Selected assembler output not supported'#000+
   'E_Unsupported symbol type for operand'#000+
   'E_Unsupported symbol type for operand'#000+
   'I_Assembling (pipe) $1'#000+
   'I_Assembling (pipe) $1'#000+
   'E_Can'#039't create assember file $1'#000+
   'E_Can'#039't create assember file $1'#000+
-  'W_Assembler $1 not found, switching to external assembling'#000+
+  'W_Assembler $1 not found, ','switching to external assembling'#000+
   'U_Using assembler: $1'#000+
   'U_Using assembler: $1'#000+
-  'W_Error while a','ssembling'#000+
+  'W_Error while assembling'#000+
   'W_Can'#039't call the assembler, switching to external assembling'#000+
   'W_Can'#039't call the assembler, switching to external assembling'#000+
   'I_Assembling $1'#000+
   'I_Assembling $1'#000+
   'W_Linker $1 not found, switching to external linking'#000+
   'W_Linker $1 not found, switching to external linking'#000+
   'U_Using linker: $1'#000+
   'U_Using linker: $1'#000+
-  'W_Object $1 not found, Linking may fail !'#000+
-  'W_Library $1 not found, Linking may fai','l !'#000+
+  'W_Object $1',' not found, Linking may fail !'#000+
+  'W_Library $1 not found, Linking may fail !'#000+
   'W_Error while linking'#000+
   'W_Error while linking'#000+
   'W_Can'#039't call the linker, switching to external linking'#000+
   'W_Can'#039't call the linker, switching to external linking'#000+
   'I_Linking $1'#000+
   'I_Linking $1'#000+
   'W_binder not found, switching to external binding'#000+
   'W_binder not found, switching to external binding'#000+
-  'W_ar not found, switching to external ar'#000+
+  'W_ar not found, switching ','to external ar'#000+
   'E_Dynamic Libraries not supported'#000+
   'E_Dynamic Libraries not supported'#000+
   'I_Closing script $1'#000+
   'I_Closing script $1'#000+
-  'U','_PPU Loading $1'#000+
+  'U_PPU Loading $1'#000+
   'D_PPU Time: $1'#000+
   'D_PPU Time: $1'#000+
   'D_PPU File too short'#000+
   'D_PPU File too short'#000+
   'D_PPU Invalid Header (no PPU at the begin)'#000+
   'D_PPU Invalid Header (no PPU at the begin)'#000+
@@ -407,169 +415,169 @@ const msgtxt : array[0..00084,1..240] of char=(+
   'D_PPU Flags: $1'#000+
   'D_PPU Flags: $1'#000+
   'D_PPU Crc: $1'#000+
   'D_PPU Crc: $1'#000+
   'T_PPU Source: $1'#000+
   'T_PPU Source: $1'#000+
-  'D_objectfile and assemblerfile are older than ppufile'#000+
-  'D_objectfile is old','er than assemblerfile'#000+
+  'D_o','bjectfile and assemblerfile are older than ppufile'#000+
+  'D_objectfile is older than assemblerfile'#000+
   'T_Unitsearch: $1'#000+
   'T_Unitsearch: $1'#000+
   'U_Writing $1'#000+
   'U_Writing $1'#000+
   'F_Can'#039't Write PPU-File'#000+
   'F_Can'#039't Write PPU-File'#000+
   'F_reading PPU-File'#000+
   'F_reading PPU-File'#000+
   'F_Invalid PPU-File entry: $1'#000+
   'F_Invalid PPU-File entry: $1'#000+
   'F_PPU Dbx count problem'#000+
   'F_PPU Dbx count problem'#000+
-  'E_Illegal unit name: $1'#000+
+  'E_Illegal unit name: $1',#000+
   'F_Too much units'#000+
   'F_Too much units'#000+
   'F_Circular unit reference'#000+
   'F_Circular unit reference'#000+
-  'F_Can'#039't compile unit $1, n','o sources available'#000+
+  'F_Can'#039't compile unit $1, no sources available'#000+
   'W_Compiling the system unit requires the -Us switch'#000+
   'W_Compiling the system unit requires the -Us switch'#000+
   'F_There were $1 errors compiling module, stopping'#000+
   'F_There were $1 errors compiling module, stopping'#000+
   '$1 [options] <inputfile> [options]'#000+
   '$1 [options] <inputfile> [options]'#000+
-  'W_Only one source file supported'#000+
+  'W_Only one so','urce file supported'#000+
   'W_DEF file can be created only for OS/2'#000+
   'W_DEF file can be created only for OS/2'#000+
-  'E_nested r','esponse files are not supported'#000+
+  'E_nested response files are not supported'#000+
   'F_No source file name in command line'#000+
   'F_No source file name in command line'#000+
   'E_Illegal parameter: $1'#000+
   'E_Illegal parameter: $1'#000+
   'H_-? writes help pages'#000+
   'H_-? writes help pages'#000+
   'F_Too many config files nested'#000+
   'F_Too many config files nested'#000+
-  'F_Unable to open file $1'#000+
+  'F_Unable to open file ','$1'#000+
   'N_Reading further options from $1'#000+
   'N_Reading further options from $1'#000+
   'W_Target is already set to: $1'#000+
   'W_Target is already set to: $1'#000+
-  'W_','Shared libs not supported on DOS platform, reverting to static'#000+
+  'W_Shared libs not supported on DOS platform, reverting to static'#000+
   'F_too many IF(N)DEFs'#000+
   'F_too many IF(N)DEFs'#000+
   'F_too many ENDIFs'#000+
   'F_too many ENDIFs'#000+
   'F_open conditional at the end of the file'#000+
   'F_open conditional at the end of the file'#000+
-  'W_Debug information generation is not supported by this executable'#000+
-  'H_Try recompiling with -dGDB'#000,+
+  'W_Debug information genera','tion is not supported by this executable'#000+
+  'H_Try recompiling with -dGDB'#000+
   'Free Pascal Compiler version $FPCVER [$FPCDATE] for $FPCTARGET'#000+
   'Free Pascal Compiler version $FPCVER [$FPCDATE] for $FPCTARGET'#000+
   'Copyright (c) 1993-98 by Florian Klaempfl'#000+
   'Copyright (c) 1993-98 by Florian Klaempfl'#000+
   'Free Pascal Compiler version $FPCVER'#000+
   'Free Pascal Compiler version $FPCVER'#000+
   '<lf>'#000+
   '<lf>'#000+
-  'Compiler Date  : $FPCDATE'#000+
+  'Compiler Date  : $FPCDA','TE'#000+
   'Compiler Target: $FPCTARGET'#000+
   'Compiler Target: $FPCTARGET'#000+
   '<lf>'#000+
   '<lf>'#000+
-  'This program comes under the GNU G','eneral Public Licence'#000+
+  'This program comes under the GNU General Public Licence'#000+
   'For more information read COPYING.FPC'#000+
   'For more information read COPYING.FPC'#000+
   '<lf>'#000+
   '<lf>'#000+
   'Report bugs,suggestions etc to:'#000+
   'Report bugs,suggestions etc to:'#000+
   '                [email protected]'#000+
   '                [email protected]'#000+
-  '**0*_+ switch option on, - off'#000+
+  '**0*_+ switch option on,',' - off'#000+
   '**1a_the compiler doesn'#039't delete the generated assembler file'#000+
   '**1a_the compiler doesn'#039't delete the generated assembler file'#000+
-  '*','t1b_use EMS'#000+
+  '**2al_list sourcecode lines in assembler file  (still BETA !!)'#000+
+  '*t1b_use EMS'#000+
   '**1B_build all modules'#000+
   '**1B_build all modules'#000+
   '**1C_code generation options'#000+
   '**1C_code generation options'#000+
   '3*2CD_create dynamic library'#000+
   '3*2CD_create dynamic library'#000+
-  '**2Ch<n>_<n> bytes heap (between 1023 and 67107840)'#000+
+  '**2Ch<n>_<n> b','ytes heap (between 1023 and 67107840)'#000+
   '**2Ci_IO-checking'#000+
   '**2Ci_IO-checking'#000+
   '**2Cn_omit linking stage'#000+
   '**2Cn_omit linking stage'#000+
   '**2Co_check overflow of integer operations'#000+
   '**2Co_check overflow of integer operations'#000+
-  '**2Cr_ran','ge checking'#000+
+  '**2Cr_range checking'#000+
   '**2Cs<n>_set stack size to <n>'#000+
   '**2Cs<n>_set stack size to <n>'#000+
   '**2Ct_stack checking'#000+
   '**2Ct_stack checking'#000+
   '3*2CS_create static library'#000+
   '3*2CS_create static library'#000+
-  '3*2Cx_use smartlinking'#000+
+  '3*2Cx_use smart','linking'#000+
   '**1d<x>_defines the symbol <x>'#000+
   '**1d<x>_defines the symbol <x>'#000+
   '*O1D_generate a DEF file'#000+
   '*O1D_generate a DEF file'#000+
   '*O2Dd<x>_set description to <x>'#000+
   '*O2Dd<x>_set description to <x>'#000+
   '*O2Dw_PM application'#000+
   '*O2Dw_PM application'#000+
-  '**1e<x>_set path',' to executable'#000+
+  '**1e<x>_set path to executable'#000+
   '**1E_same as -Cn'#000+
   '**1E_same as -Cn'#000+
   '**1F_set file names and paths'#000+
   '**1F_set file names and paths'#000+
   '**2Fe<x>_redirect error output to <x>'#000+
   '**2Fe<x>_redirect error output to <x>'#000+
-  '*L2Fg<x>_same as -Fl'#000+
+  '*L2Fg<x','>_same as -Fl'#000+
   '**2Fi<x>_adds <x> to include path'#000+
   '**2Fi<x>_adds <x> to include path'#000+
   '**2Fl<x>_adds <x> to library path'#000+
   '**2Fl<x>_adds <x> to library path'#000+
   '*L2FL<x>_uses <x> as dynamic linker'#000+
   '*L2FL<x>_uses <x> as dynamic linker'#000+
-  '**2Fo<x>_adds <','x> to object path'#000+
+  '**2Fo<x>_adds <x> to object path'#000+
   '**2Fr<x>_load error message file <x>'#000+
   '**2Fr<x>_load error message file <x>'#000+
   '**2Fu<x>_adds <x> to unit path'#000+
   '**2Fu<x>_adds <x> to unit path'#000+
-  '*g1g_generate debugger information'#000+
+  '*g1g_generate debugge','r information'#000+
   '*g2gg_use gsym'#000+
   '*g2gg_use gsym'#000+
   '*g2gd_use dbx'#000+
   '*g2gd_use dbx'#000+
   '**1i_information'#000+
   '**1i_information'#000+
   '**1I<x>_adds <x> to include path'#000+
   '**1I<x>_adds <x> to include path'#000+
   '**1k<x>_Pass <x> to the linker'#000+
   '**1k<x>_Pass <x> to the linker'#000+
-  '**1l_writ','e logo'#000+
+  '**1l_write logo'#000+
   '**1n_don'#039't read the default config file'#000+
   '**1n_don'#039't read the default config file'#000+
   '**1o<x>_change the name of the executable produced to <x>'#000+
   '**1o<x>_change the name of the executable produced to <x>'#000+
-  '**1pg_generate profile code for gprof'#000+
+  '**','1pg_generate profile code for gprof'#000+
   '*L1P_use pipes instead of creating temporary assembler files'#000+
   '*L1P_use pipes instead of creating temporary assembler files'#000+
   '**1S_syntax options'#000+
   '**1S_syntax options'#000+
-  '**2S2_switch som','e Delphi 2 extensions on'#000+
+  '**2S2_switch some Delphi 2 extensions on'#000+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#000+
   '**2Sc_supports operators like C (*=,+=,/= and -=)'#000+
-  '**2Sd_compiler disposes asm lists (uses less memory but slower)'#000+
+  '**2Sd_compiler disposes asm list','s (uses less memory but slower)'#000+
   '**2Se_compiler stops after the first error'#000+
   '**2Se_compiler stops after the first error'#000+
   '**2Sg_allow LABEL and GOTO'#000+
   '**2Sg_allow LABEL and GOTO'#000+
-  '**2Si_support C++ stlyed INLINE',#000+
+  '**2Si_support C++ stlyed INLINE'#000+
   '**2Sm_support macros like C (global)'#000+
   '**2Sm_support macros like C (global)'#000+
   '**2So_tries to be TP/BP 7.0 compatible'#000+
   '**2So_tries to be TP/BP 7.0 compatible'#000+
-  '**2Sp_tries to be gpc compatible'#000+
+  '**2Sp_tries to be gpc compatib','le'#000+
   '**2Ss_constructor name must be init (destructor must be done)'#000+
   '**2Ss_constructor name must be init (destructor must be done)'#000+
   '**2St_allow static keyword in objects'#000+
   '**2St_allow static keyword in objects'#000+
-  '**2Sv_allow variable directive','s (cvar,external,public,export)'#000+
+  '**2Sv_allow variable directives (cvar,external,public,export)'#000+
   '**1s_don'#039't call assembler and linker (only with -a)'#000+
   '**1s_don'#039't call assembler and linker (only with -a)'#000+
-  '**1T<x>_Target operating system'#000+
+  '**1T<x>_Target operatin','g system'#000+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
   '3*2TGO32V1_version 1 of DJ Delorie DOS extender'#000+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#000+
   '3*2TGO32V2_version 2 of DJ Delorie DOS extender'#000+
   '3*2TLINUX_Linux'#000+
   '3*2TLINUX_Linux'#000+
-  '3*2TOS2_OS/2',' 2.x'#000+
+  '3*2TOS2_OS/2 2.x'#000+
   '3*2TWin32_Windows 32 Bit'#000+
   '3*2TWin32_Windows 32 Bit'#000+
   '6*2TAMIGA_Commodore Amiga'#000+
   '6*2TAMIGA_Commodore Amiga'#000+
   '6*2TATARI_Atari ST/STe/TT'#000+
   '6*2TATARI_Atari ST/STe/TT'#000+
-  '6*2TMACOS_Macintosh m68k'#000+
+  '6*2TMACOS_Macintosh m68k'#000,+
   '6*2TLINUX_Linux-68k'#000+
   '6*2TLINUX_Linux-68k'#000+
   '**1u<x>_undefines the symbol <x>'#000+
   '**1u<x>_undefines the symbol <x>'#000+
   '**1U_unit options'#000+
   '**1U_unit options'#000+
   '**2Un_don'#039't check the unit name'#000+
   '**2Un_don'#039't check the unit name'#000+
   '**2Up<x>_same as -Fu<x>'#000+
   '**2Up<x>_same as -Fu<x>'#000+
-  '**2Us_','compile a system unit'#000+
+  '**2Us_compile a system unit'#000+
   '**1v<x>_Be verbose. <x> is a combination of the following letters :'#000+
   '**1v<x>_Be verbose. <x> is a combination of the following letters :'#000+
-  '**2*_e : Show errors (default)       d : Show debug info'#000+
+  '**2*_e : Show err','ors (default)       d : Show debug info'#000+
   '**2*_w : Show warnings               u : Show used files'#000+
   '**2*_w : Show warnings               u : Show used files'#000+
-  '**2*_n : Show notes                 ',' t : Show tried files'#000+
+  '**2*_n : Show notes                  t : Show tried files'#000+
   '**2*_h : Show hints                  m : Show defined macros'#000+
   '**2*_h : Show hints                  m : Show defined macros'#000+
-  '**2*_i : Show general info           p : Show compiled procedures'#000+
+  '**2*_i : Show general in','fo           p : Show compiled procedures'#000+
   '**2*_l : Show linenumbers            c : Show conditionals'#000+
   '**2*_l : Show linenumbers            c : Show conditionals'#000+
-  '**2*_a : Show everything        ','     0 : Show nothing (except errors'+
-  ')'#000+
+  '**2*_a : Show everything             0 : Show nothing (except errors)'#000+
   '**1X_executable options'#000+
   '**1X_executable options'#000+
   '*L2Xc_link with the c library'#000+
   '*L2Xc_link with the c library'#000+
-  '**2XD_link with dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
+  '**2XD_link with',' dynamic libraries (defines FPC_LINK_DYNAMIC)'#000+
   '**2Xs_strip all symbols from executable'#000+
   '**2Xs_strip all symbols from executable'#000+
-  '**2XS_link with static libraries (defines FPC_L','INK_STATIC)'#000+
+  '**2XS_link with static libraries (defines FPC_LINK_STATIC)'#000+
   '**0*_Processor specific options:'#000+
   '**0*_Processor specific options:'#000+
   '3*1A_output format'#000+
   '3*1A_output format'#000+
   '3*2Ao_coff file using GNU AS'#000+
   '3*2Ao_coff file using GNU AS'#000+
-  '3*2Anasmcoff_coff file using Nasm'#000+
+  '3*2Anasmcoff_c','off file using Nasm'#000+
   '3*2Anasmelf_elf32 (linux) file using Nasm'#000+
   '3*2Anasmelf_elf32 (linux) file using Nasm'#000+
   '3*2Anasmobj_obj file using Nasm'#000+
   '3*2Anasmobj_obj file using Nasm'#000+
   '3*2Amasm_obj using Masm (Mircosoft)'#000+
   '3*2Amasm_obj using Masm (Mircosoft)'#000+
-  '3*2','Atasm_obj using Tasm (Borland)'#000+
+  '3*2Atasm_obj using Tasm (Borland)'#000+
   '3*1R_assembler reading style'#000+
   '3*1R_assembler reading style'#000+
   '3*2Ratt_read AT&T style assembler'#000+
   '3*2Ratt_read AT&T style assembler'#000+
-  '3*2Rintel_read Intel style assembler'#000+
+  '3*2Rintel_rea','d Intel style assembler'#000+
   '3*2Rdirect_copy assembler text directly to assembler file'#000+
   '3*2Rdirect_copy assembler text directly to assembler file'#000+
   '3*1O<x>_optimizations'#000+
   '3*1O<x>_optimizations'#000+
   '3*2Og_generate smaller code'#000+
   '3*2Og_generate smaller code'#000+
-  '3','*2OG_generate faster code (default)'#000+
+  '3*2OG_generate faster code (default)'#000+
   '3*2Or_keep certain variables in registers (still BUGGY!!!)'#000+
   '3*2Or_keep certain variables in registers (still BUGGY!!!)'#000+
-  '3*2Ou_enable uncertain optimizations (see docs)'#000+
+  '3*2Ou_enable',' uncertain optimizations (see docs)'#000+
   '3*2O1_level 1 optimizations (quick optimizations)'#000+
   '3*2O1_level 1 optimizations (quick optimizations)'#000+
-  '3*2O2_level 2 optimizations (-O1 + slower optim','izations)'#000+
+  '3*2O2_level 2 optimizations (-O1 + slower optimizations)'#000+
   '3*2O3_level 3 optimizations (same as -O2u)'#000+
   '3*2O3_level 3 optimizations (same as -O2u)'#000+
   '3*2Op_target processor'#000+
   '3*2Op_target processor'#000+
-  '3*3Op1_set target processor to 386/486'#000+
+  '3*3Op1_set target processor to ','386/486'#000+
   '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
   '3*3Op2_set target processor to Pentium/PentiumMMX (tm)'#000+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
   '3*3Op3_set target processor to PPro/PII/c6x86/K6 (tm)'#000+
-  '6*1A_output form','at'#000+
+  '6*1A_output format'#000+
   '6*2Ao_Unix o-file using GNU AS'#000+
   '6*2Ao_Unix o-file using GNU AS'#000+
   '6*2Agas_GNU Motorola assembler'#000+
   '6*2Agas_GNU Motorola assembler'#000+
   '6*2Amit_MIT Syntax (old GAS)'#000+
   '6*2Amit_MIT Syntax (old GAS)'#000+
-  '6*2Amot_Standard Motorola assembler'#000+
+  '6*2Amot_Stand','ard Motorola assembler'#000+
   '6*1O_optimizations'#000+
   '6*1O_optimizations'#000+
   '6*2Oa_turn on the optimizer'#000+
   '6*2Oa_turn on the optimizer'#000+
   '6*2Og_generate smaller code'#000+
   '6*2Og_generate smaller code'#000+
-  '6*2OG_generate faster code (default',')'#000+
+  '6*2OG_generate faster code (default)'#000+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#000+
   '6*2Ox_optimize maximum (still BUGGY!!!)'#000+
   '6*2O2_set target processor to a MC68020+'#000+
   '6*2O2_set target processor to a MC68020+'#000+
   '**1*_'#000+
   '**1*_'#000+
-  '**1?_shows this help'#000+
+  '**1?_shows this he','lp'#000+
   '**1h_shows this help without waiting'#000
   '**1h_shows this help without waiting'#000
 );
 );

+ 7 - 3
compiler/parser.pas

@@ -33,8 +33,9 @@ unit parser;
   implementation
   implementation
 
 
     uses
     uses
-      cobjects,verbose,comphook,systems,globals,
-      symtable,files,aasm,hcodegen,
+      cobjects,comphook,systems,globals,
+      hcodegen,verbose, { leave this order, else hcodegen.message will be used !! }
+      symtable,files,aasm,
       assemble,link,script,gendef,
       assemble,link,script,gendef,
 {$ifdef UseBrowser}
 {$ifdef UseBrowser}
       browser,
       browser,
@@ -371,7 +372,10 @@ unit parser;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.41  1998-09-01 12:53:24  peter
+  Revision 1.42  1998-09-04 08:41:59  peter
+    * updated some error messages
+
+  Revision 1.41  1998/09/01 12:53:24  peter
     + aktpackenum
     + aktpackenum
 
 
   Revision 1.40  1998/09/01 07:54:19  pierre
   Revision 1.40  1998/09/01 07:54:19  pierre

+ 195 - 146
compiler/pass_1.pas

@@ -233,8 +233,13 @@ unit pass_1;
          if (def_from^.deftype=orddef) and (def_to^.deftype=orddef) then
          if (def_from^.deftype=orddef) and (def_to^.deftype=orddef) then
            begin
            begin
               doconv:=basedefconverts[porddef(def_from)^.typ,porddef(def_to)^.typ];
               doconv:=basedefconverts[porddef(def_from)^.typ,porddef(def_to)^.typ];
-              if doconv<>tc_not_possible then
-                b:=true;
+            { Don't allow automatic int->bool.
+              Very Bad Hack !!!! (PFV) }
+              if (doconv=tc_int_2_bool) and (not explicit) then
+               b:=false
+              else
+               if doconv<>tc_not_possible then
+                 b:=true;
            end
            end
          else
          else
 
 
@@ -266,7 +271,7 @@ unit pass_1;
                    if (pfloatdef(def_to)^.typ=s64bit) and
                    if (pfloatdef(def_to)^.typ=s64bit) and
                       (pfloatdef(def_from)^.typ<>s64bit)  and
                       (pfloatdef(def_from)^.typ<>s64bit)  and
                       not (explicit) then
                       not (explicit) then
-                     Message(parser_w_convert_real_2_comp);
+                     Message(type_w_convert_real_2_comp);
 {$endif}
 {$endif}
                 end;
                 end;
               b:=true;
               b:=true;
@@ -825,7 +830,7 @@ unit pass_1;
                          firstpass(t);
                          firstpass(t);
                        end;
                        end;
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               end;
               end;
               disposetree(p);
               disposetree(p);
               firstpass(t);
               firstpass(t);
@@ -851,7 +856,7 @@ unit pass_1;
                equaln : t:=genordinalconstnode(ord(lvd=rvd),booldef);
                equaln : t:=genordinalconstnode(ord(lvd=rvd),booldef);
              unequaln : t:=genordinalconstnode(ord(lvd<>rvd),booldef);
              unequaln : t:=genordinalconstnode(ord(lvd<>rvd),booldef);
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               end;
               end;
               disposetree(p);
               disposetree(p);
               p:=t;
               p:=t;
@@ -879,8 +884,8 @@ unit pass_1;
 {$else UseAnsiString}
 {$else UseAnsiString}
               s1^:=char(byte(p^.left^.value));
               s1^:=char(byte(p^.left^.value));
               s2^:=char(byte(p^.right^.value));
               s2^:=char(byte(p^.right^.value));
-              concatstrings:=true;
 {$endif UseAnsiString}
 {$endif UseAnsiString}
+              concatstrings:=true;
            end
            end
          else
          else
            if (lt=stringconstn) and (rt=ordconstn) and
            if (lt=stringconstn) and (rt=ordconstn) and
@@ -895,8 +900,8 @@ unit pass_1;
 {$else UseAnsiString}
 {$else UseAnsiString}
               s1^:=p^.left^.values^;
               s1^:=p^.left^.values^;
               s2^:=char(byte(p^.right^.value));
               s2^:=char(byte(p^.right^.value));
-              concatstrings:=true;
 {$endif UseAnsiString}
 {$endif UseAnsiString}
+              concatstrings:=true;
            end
            end
          else if (lt=ordconstn) and (rt=stringconstn) and
          else if (lt=ordconstn) and (rt=stringconstn) and
            (ld^.deftype=orddef) and
            (ld^.deftype=orddef) and
@@ -911,8 +916,8 @@ unit pass_1;
 {$else UseAnsiString}
 {$else UseAnsiString}
               s1^:=char(byte(p^.left^.value));
               s1^:=char(byte(p^.left^.value));
               s2^:=p^.right^.values^;
               s2^:=p^.right^.values^;
-              concatstrings:=true;
 {$endif UseAnsiString}
 {$endif UseAnsiString}
+              concatstrings:=true;
            end
            end
          else if (lt=stringconstn) and (rt=stringconstn) then
          else if (lt=stringconstn) and (rt=stringconstn) then
            begin
            begin
@@ -921,12 +926,11 @@ unit pass_1;
               l1:=p^.left^.length;
               l1:=p^.left^.length;
               s2:=getpcharcopy(p^.right);
               s2:=getpcharcopy(p^.right);
               l2:=p^.right^.length;
               l2:=p^.right^.length;
-              concatstrings:=true;
 {$else UseAnsiString}
 {$else UseAnsiString}
               s1^:=p^.left^.values^;
               s1^:=p^.left^.values^;
               s2^:=p^.right^.values^;
               s2^:=p^.right^.values^;
-              concatstrings:=true;
 {$endif UseAnsiString}
 {$endif UseAnsiString}
+              concatstrings:=true;
            end;
            end;
 
 
          { I will need to translate all this to ansistrings !!! }
          { I will need to translate all this to ansistrings !!! }
@@ -996,7 +1000,7 @@ unit pass_1;
                           calcregisters(p,1,0,0);
                           calcregisters(p,1,0,0);
                         end
                         end
                 else
                 else
-                  Message(sym_e_type_mismatch);
+                  Message(type_e_mismatch);
                 end;
                 end;
                 convdone:=true;
                 convdone:=true;
               end
               end
@@ -1050,11 +1054,11 @@ unit pass_1;
              { right site must also be a setdef, unless addn is used }
              { right site must also be a setdef, unless addn is used }
                 if not(p^.treetype in [subn,symdifn,addn,muln,equaln,unequaln]) or
                 if not(p^.treetype in [subn,symdifn,addn,muln,equaln,unequaln]) or
                    ((rd^.deftype<>setdef) and (p^.treetype<>addn)) then
                    ((rd^.deftype<>setdef) and (p^.treetype<>addn)) then
-                  Message(sym_e_type_mismatch);
+                  Message(type_e_mismatch);
 
 
                 if ((rd^.deftype=setdef) and not(is_equal(rd,ld))) and
                 if ((rd^.deftype=setdef) and not(is_equal(rd,ld))) and
                    not((rt=setelementn) and is_equal(psetdef(ld)^.setof,rd)) then
                    not((rt=setelementn) and is_equal(psetdef(ld)^.setof,rd)) then
-                  Message(sym_e_set_element_are_not_comp);
+                  Message(type_e_set_element_are_not_comp);
 
 
                 { ranges require normsets }
                 { ranges require normsets }
                 if (psetdef(ld)^.settype=smallset) and
                 if (psetdef(ld)^.settype=smallset) and
@@ -1079,8 +1083,8 @@ unit pass_1;
                  end;
                  end;
 
 
                 { do constant evalution }
                 { do constant evalution }
-                if (p^.right^.treetype=setconstrn) and
-                   (p^.left^.treetype=setconstrn) then
+                if (p^.right^.treetype=setconstn) and
+                   (p^.left^.treetype=setconstn) then
                   begin
                   begin
                      new(resultset);
                      new(resultset);
                      case p^.treetype of
                      case p^.treetype of
@@ -1088,25 +1092,25 @@ unit pass_1;
                                   for i:=0 to 31 do
                                   for i:=0 to 31 do
                                     resultset^[i]:=
                                     resultset^[i]:=
                                       p^.right^.constset^[i] or p^.left^.constset^[i];
                                       p^.right^.constset^[i] or p^.left^.constset^[i];
-                                  t:=gensetconstruktnode(resultset,psetdef(ld));
+                                  t:=gensetconstnode(resultset,psetdef(ld));
                                end;
                                end;
                         muln : begin
                         muln : begin
                                   for i:=0 to 31 do
                                   for i:=0 to 31 do
                                     resultset^[i]:=
                                     resultset^[i]:=
                                       p^.right^.constset^[i] and p^.left^.constset^[i];
                                       p^.right^.constset^[i] and p^.left^.constset^[i];
-                                  t:=gensetconstruktnode(resultset,psetdef(ld));
+                                  t:=gensetconstnode(resultset,psetdef(ld));
                                end;
                                end;
                         subn : begin
                         subn : begin
                                   for i:=0 to 31 do
                                   for i:=0 to 31 do
                                     resultset^[i]:=
                                     resultset^[i]:=
                                       p^.left^.constset^[i] and not(p^.right^.constset^[i]);
                                       p^.left^.constset^[i] and not(p^.right^.constset^[i]);
-                                  t:=gensetconstruktnode(resultset,psetdef(ld));
+                                  t:=gensetconstnode(resultset,psetdef(ld));
                                end;
                                end;
                      symdifn : begin
                      symdifn : begin
                                   for i:=0 to 31 do
                                   for i:=0 to 31 do
                                     resultset^[i]:=
                                     resultset^[i]:=
                                       p^.left^.constset^[i] xor p^.right^.constset^[i];
                                       p^.left^.constset^[i] xor p^.right^.constset^[i];
-                                  t:=gensetconstruktnode(resultset,psetdef(ld));
+                                  t:=gensetconstnode(resultset,psetdef(ld));
                                end;
                                end;
                     unequaln : begin
                     unequaln : begin
                                  b:=true;
                                  b:=true;
@@ -1194,16 +1198,16 @@ unit pass_1;
                  ltn,lten,gtn,gten:
                  ltn,lten,gtn,gten:
                    begin
                    begin
                       if not(cs_extsyntax in aktmoduleswitches) then
                       if not(cs_extsyntax in aktmoduleswitches) then
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_mismatch);
                    end;
                    end;
                  subn:
                  subn:
                    begin
                    begin
                       if not(cs_extsyntax in aktmoduleswitches) then
                       if not(cs_extsyntax in aktmoduleswitches) then
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_mismatch);
                       p^.resulttype:=s32bitdef;
                       p^.resulttype:=s32bitdef;
                       exit;
                       exit;
                    end;
                    end;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
            end
            end
@@ -1222,7 +1226,7 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end
             end
@@ -1241,7 +1245,7 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
            end
            end
@@ -1257,7 +1261,7 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end
             end
@@ -1272,7 +1276,7 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end
             end
@@ -1285,7 +1289,7 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end
             end
@@ -1299,7 +1303,7 @@ unit pass_1;
               case p^.treetype of
               case p^.treetype of
                 equaln,unequaln : ;
                 equaln,unequaln : ;
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
            end
            end
@@ -1314,10 +1318,10 @@ unit pass_1;
               if p^.treetype=addn then
               if p^.treetype=addn then
                 begin
                 begin
                   if not(cs_extsyntax in aktmoduleswitches) then
                   if not(cs_extsyntax in aktmoduleswitches) then
-                    Message(sym_e_type_mismatch);
+                    Message(type_e_mismatch);
                 end
                 end
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               convdone:=true;
               convdone:=true;
             end
             end
          else
          else
@@ -1330,9 +1334,9 @@ unit pass_1;
               calcregisters(p,1,0,0);
               calcregisters(p,1,0,0);
               case p^.treetype of
               case p^.treetype of
                 addn,subn : if not(cs_extsyntax in aktmoduleswitches) then
                 addn,subn : if not(cs_extsyntax in aktmoduleswitches) then
-                              Message(sym_e_type_mismatch);
+                              Message(type_e_mismatch);
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
            end
            end
@@ -1345,7 +1349,7 @@ unit pass_1;
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln : ;
                  equaln,unequaln : ;
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end
             end
@@ -1364,9 +1368,9 @@ unit pass_1;
                 muln:
                 muln:
                   if not(mmx_type(p^.left^.resulttype) in
                   if not(mmx_type(p^.left^.resulttype) in
                     [mmxu16bit,mmxs16bit,mmxfixed16]) then
                     [mmxu16bit,mmxs16bit,mmxfixed16]) then
-                    Message(sym_e_type_mismatch);
+                    Message(type_e_mismatch);
                 else
                 else
-                  Message(sym_e_type_mismatch);
+                  Message(type_e_mismatch);
               end;
               end;
               p^.location.loc:=LOC_MMXREGISTER;
               p^.location.loc:=LOC_MMXREGISTER;
               calcregisters(p,0,0,1);
               calcregisters(p,0,0,1);
@@ -1381,7 +1385,7 @@ unit pass_1;
               case p^.treetype of
               case p^.treetype of
                  equaln,unequaln,
                  equaln,unequaln,
                  ltn,lten,gtn,gten : ;
                  ltn,lten,gtn,gten : ;
-                 else Message(sym_e_type_mismatch);
+                 else Message(type_e_mismatch);
               end;
               end;
               convdone:=true;
               convdone:=true;
             end;
             end;
@@ -1392,7 +1396,8 @@ unit pass_1;
               { but an int/int gives real/real! }
               { but an int/int gives real/real! }
               if p^.treetype=slashn then
               if p^.treetype=slashn then
                 begin
                 begin
-                   Message(parser_w_use_int_div_int_op);
+                   Message(type_w_int_slash_int);
+                   Message(type_h_use_div_for_int);
                    p^.right:=gentypeconvnode(p^.right,c64floatdef);
                    p^.right:=gentypeconvnode(p^.right,c64floatdef);
                    p^.left:=gentypeconvnode(p^.left,c64floatdef);
                    p^.left:=gentypeconvnode(p^.left,c64floatdef);
                    firstpass(p^.left);
                    firstpass(p^.left);
@@ -1648,7 +1653,7 @@ unit pass_1;
                if (cs_mmx_saturation in aktlocalswitches^) and
                if (cs_mmx_saturation in aktlocalswitches^) and
                  (porddef(parraydef(p^.resulttype)^.definition)^.typ in
                  (porddef(parraydef(p^.resulttype)^.definition)^.typ in
                  [s32bit,u32bit]) then
                  [s32bit,u32bit]) then
-                 Message(sym_e_type_mismatch);
+                 Message(type_e_mismatch);
                }
                }
              end
              end
 {$endif SUPPORT_MMX}
 {$endif SUPPORT_MMX}
@@ -1689,7 +1694,7 @@ unit pass_1;
                      end;
                      end;
                    minusdef:=minusdef^.nextoverloaded;
                    minusdef:=minusdef^.nextoverloaded;
                 end;
                 end;
-              Message(sym_e_type_mismatch);
+              Message(type_e_mismatch);
            end;
            end;
       end;
       end;
 
 
@@ -1878,7 +1883,7 @@ unit pass_1;
 
 
          { assignements to open arrays aren't allowed }
          { assignements to open arrays aren't allowed }
          if is_open_array(p^.left^.resulttype) then
          if is_open_array(p^.left^.resulttype) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
          { test if we can avoid copying string to temp
          { test if we can avoid copying string to temp
            as in s:=s+...; (PM) }
            as in s:=s+...; (PM) }
 {$ifdef dummyi386}
 {$ifdef dummyi386}
@@ -2033,7 +2038,7 @@ unit pass_1;
          { both types must be compatible }
          { both types must be compatible }
          if not(is_equal(p^.left^.resulttype,p^.right^.resulttype)) and
          if not(is_equal(p^.left^.resulttype,p^.right^.resulttype)) and
             not(isconvertable(p^.left^.resulttype,p^.right^.resulttype,ct,ordconstn,false)) then
             not(isconvertable(p^.left^.resulttype,p^.right^.resulttype,ct,ordconstn,false)) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
          { Check if only when its a constant set }
          { Check if only when its a constant set }
          if (p^.left^.treetype=ordconstn) and (p^.right^.treetype=ordconstn) then
          if (p^.left^.treetype=ordconstn) and (p^.right^.treetype=ordconstn) then
           begin
           begin
@@ -2070,7 +2075,7 @@ unit pass_1;
                 ct,ordconstn,false)) and
                 ct,ordconstn,false)) and
               not(is_equal(p^.right^.resulttype,
               not(is_equal(p^.right^.resulttype,
                 parraydef(p^.left^.resulttype)^.rangedef)) then
                 parraydef(p^.left^.resulttype)^.rangedef)) then
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
            end;
            end;
          { Never convert a boolean or a char !}
          { Never convert a boolean or a char !}
          { maybe type conversion }
          { maybe type conversion }
@@ -2116,7 +2121,7 @@ unit pass_1;
                 end;
                 end;
              end
              end
            else
            else
-             Message(sym_e_type_mismatch);
+             Message(type_e_mismatch);
          { the register calculation is easy if a const index is used }
          { the register calculation is easy if a const index is used }
          if p^.right^.treetype=ordconstn then
          if p^.right^.treetype=ordconstn then
            begin
            begin
@@ -2558,7 +2563,7 @@ unit pass_1;
               (psetdef(p^.left^.resulttype)^.settype=smallset) then
               (psetdef(p^.left^.resulttype)^.settype=smallset) then
             begin
             begin
             { try to define the set as a normalset if it's a constant set }
             { try to define the set as a normalset if it's a constant set }
-              if p^.left^.treetype=setconstrn then
+              if p^.left^.treetype=setconstn then
                begin
                begin
                  p^.resulttype:=p^.left^.resulttype;
                  p^.resulttype:=p^.left^.resulttype;
                  psetdef(p^.resulttype)^.settype:=normset
                  psetdef(p^.resulttype)^.settype:=normset
@@ -2622,7 +2627,7 @@ unit pass_1;
                           firstpass(p^.left);
                           firstpass(p^.left);
                           if not is_equal(p^.left^.resulttype,p^.resulttype) then
                           if not is_equal(p^.left^.resulttype,p^.resulttype) then
                             begin
                             begin
-                               Message(sym_e_type_mismatch);
+                               Message(type_e_mismatch);
                                exit;
                                exit;
                             end
                             end
                           else
                           else
@@ -2662,13 +2667,13 @@ unit pass_1;
                     if not is_equal(aprocdef,p^.resulttype) then
                     if not is_equal(aprocdef,p^.resulttype) then
                       begin
                       begin
                         aprocdef^.deftype:=proctype;
                         aprocdef^.deftype:=proctype;
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_mismatch);
                       end;
                       end;
                     aprocdef^.deftype:=proctype;
                     aprocdef^.deftype:=proctype;
                     firstconvert[p^.convtyp](p);
                     firstconvert[p^.convtyp](p);
                   end
                   end
                 else
                 else
-                  Message(sym_e_type_mismatch);
+                  Message(type_e_mismatch);
                 exit;
                 exit;
              end
              end
            else
            else
@@ -2771,13 +2776,12 @@ unit pass_1;
                        Message(cg_e_illegal_type_conversion);
                        Message(cg_e_illegal_type_conversion);
                 end
                 end
               else
               else
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
            end
            end
          end
          end
        else
        else
          begin
          begin
-            { just a test: p^.explizit:=false; }
-            { ordinale contants are direct converted }
+            { ordinal contants can be directly converted }
             if (p^.left^.treetype=ordconstn) and is_ordinal(p^.resulttype) then
             if (p^.left^.treetype=ordconstn) and is_ordinal(p^.resulttype) then
               begin
               begin
                  { perform range checking }
                  { perform range checking }
@@ -2950,7 +2954,7 @@ unit pass_1;
                  is_shortstring(defcoll^.data) and
                  is_shortstring(defcoll^.data) and
                  (defcoll^.paratyp=vs_var) and
                  (defcoll^.paratyp=vs_var) and
                  not(is_equal(p^.left^.resulttype,defcoll^.data)) then
                  not(is_equal(p^.left^.resulttype,defcoll^.data)) then
-                 Message(parser_e_strict_var_string_violation);
+                 Message(type_e_strict_var_string_violation);
               { Variablen, die call by reference �bergeben werden, }
               { Variablen, die call by reference �bergeben werden, }
               { k”nnen nicht in ein Register kopiert werden       }
               { k”nnen nicht in ein Register kopiert werden       }
               { is this usefull here ? }
               { is this usefull here ? }
@@ -3132,8 +3136,7 @@ unit pass_1;
                         pt:=pt^.right;
                         pt:=pt^.right;
                      end;
                      end;
 
 
-                   { alle in Frage kommenden Prozeduren in eine }
-                   { verkettete Liste einf�gen                  }
+                   { link all procedures which have the same # of parameters }
                    pd:=actprocsym^.definition;
                    pd:=actprocsym^.definition;
                    while assigned(pd) do
                    while assigned(pd) do
                      begin
                      begin
@@ -3158,7 +3161,7 @@ unit pass_1;
                                   inc(l);
                                   inc(l);
                                   pdc:=pdc^.next;
                                   pdc:=pdc^.next;
                                end;
                                end;
-                             { nur wenn die Parameterl„nge paát, dann Einf�gen }
+                             { only when the # of parameter are equal }
                              if l=paralength then
                              if l=paralength then
                                begin
                                begin
                                   new(hp);
                                   new(hp);
@@ -3180,7 +3183,16 @@ unit pass_1;
 {$endif CHAINPROCSYMS}
 {$endif CHAINPROCSYMS}
                      end;
                      end;
 
 
-                   { nun alle Parameter nacheinander vergleichen }
+                   { no procedures found? then there is something wrong
+                     with the parameter size }
+                   if not assigned(procs) and
+                      ((parsing_para_level=0) or assigned(p^.left)) then
+                    begin
+                      Message(parser_e_wrong_parameter_size);
+                      exit;
+                    end;
+
+                   { now we can compare parameter after parameter }
                    pt:=p^.left;
                    pt:=p^.left;
                    while assigned(pt) do
                    while assigned(pt) do
                      begin
                      begin
@@ -3229,13 +3241,11 @@ unit pass_1;
                                     hp:=hp^.next;
                                     hp:=hp^.next;
                                end;
                                end;
                           end
                           end
-                        { sollte nirgendwo ein Parameter exakt passen, }
-                        { so alle Prozeduren entfernen, bei denen      }
-                        { der Parameter auch nach einer impliziten     }
-                        { Typkonvertierung nicht passt                 }
+                        { when a parameter matches exact, remove all procs
+                          which need typeconvs }
                         else
                         else
                           begin
                           begin
-                             { erst am Anfang }
+                             { the first... }
                              while (assigned(procs)) and
                              while (assigned(procs)) and
                                not(isconvertable(pt^.resulttype,procs^.nextpara^.data,
                                not(isconvertable(pt^.resulttype,procs^.nextpara^.data,
                                  hcvt,pt^.left^.treetype,false)) do
                                  hcvt,pt^.left^.treetype,false)) do
@@ -3244,7 +3254,7 @@ unit pass_1;
                                   dispose(procs);
                                   dispose(procs);
                                   procs:=hp;
                                   procs:=hp;
                                end;
                                end;
-                             { und jetzt aus der Mitte }
+                             { and the others }
                              hp:=procs;
                              hp:=procs;
                              while (assigned(hp)) and assigned(hp^.next) do
                              while (assigned(hp)) and assigned(hp^.next) do
                                begin
                                begin
@@ -3259,34 +3269,38 @@ unit pass_1;
                                     hp:=hp^.next;
                                     hp:=hp^.next;
                                end;
                                end;
                           end;
                           end;
-                        { nun bei denn Prozeduren den nextpara-Zeiger auf den }
-                        { naechsten Parameter setzen                          }
+                        { update nextpara for all procedures }
                         hp:=procs;
                         hp:=procs;
                         while assigned(hp) do
                         while assigned(hp) do
                           begin
                           begin
                              hp^.nextpara:=hp^.nextpara^.next;
                              hp^.nextpara:=hp^.nextpara^.next;
                              hp:=hp^.next;
                              hp:=hp^.next;
                           end;
                           end;
+                        { load next parameter }
                         pt:=pt^.right;
                         pt:=pt^.right;
                      end;
                      end;
 
 
-                   if procs=nil then
-                     if (parsing_para_level=0) or (p^.left<>nil) then
+                   if not assigned(procs) then
+                    begin
+                      { there is an error, must be wrong type, becuase
+                        wrong size is already checked (PFV) }
+                      if (parsing_para_level=0) or (p^.left<>nil) then
                        begin
                        begin
-                          Message(parser_e_illegal_parameter_list);
-                          exit;
+                         Message(parser_e_wrong_parameter_type);
+                         exit;
                        end
                        end
-                     else
+                      else
                        begin
                        begin
-                          { try to convert to procvar }
-                          p^.treetype:=loadn;
-                          p^.resulttype:=pprocsym(p^.symtableprocentry)^.definition;
-                          p^.symtableentry:=p^.symtableprocentry;
-                          p^.is_first:=false;
-                          p^.disposetyp:=dt_nothing;
-                          firstpass(p);
-                          exit;
+                         { try to convert to procvar }
+                         p^.treetype:=loadn;
+                         p^.resulttype:=pprocsym(p^.symtableprocentry)^.definition;
+                         p^.symtableentry:=p^.symtableprocentry;
+                         p^.is_first:=false;
+                         p^.disposetyp:=dt_nothing;
+                         firstpass(p);
+                         exit;
                        end;
                        end;
+                     end;
 
 
                    { if there are several choices left then for orddef }
                    { if there are several choices left then for orddef }
                    { if a type is totally included in the other        }
                    { if a type is totally included in the other        }
@@ -3365,8 +3379,7 @@ unit pass_1;
                                          end;
                                          end;
                                     end;
                                     end;
                                end;
                                end;
-                             { nun bei denn Prozeduren den nextpara-Zeiger auf den }
-                             { naechsten Parameter setzen                          }
+                             { update nextpara for all procedures }
                              hp:=procs;
                              hp:=procs;
                              while assigned(hp) do
                              while assigned(hp) do
                                begin
                                begin
@@ -3659,8 +3672,14 @@ unit pass_1;
     procedure firstinline(var p : ptree);
     procedure firstinline(var p : ptree);
 
 
       var
       var
-         hp,hpp : ptree;
-         store_count_ref,isreal,store_valid,file_is_typed : boolean;
+         vl      : longint;
+         vr      : bestreal;
+         hp,hpp  : ptree;
+         store_count_ref,
+         isreal,
+         dowrite,
+         store_valid,
+         file_is_typed : boolean;
 
 
       procedure do_lowhigh(adef : pdef);
       procedure do_lowhigh(adef : pdef);
 
 
@@ -3694,10 +3713,6 @@ unit pass_1;
            end;
            end;
         end;
         end;
 
 
-      var
-        is_real : boolean;
-        vl      : longint;
-        vr      : bestreal;
       begin
       begin
          store_valid:=must_be_valid;
          store_valid:=must_be_valid;
          store_count_ref:=count_ref;
          store_count_ref:=count_ref;
@@ -3721,67 +3736,67 @@ unit pass_1;
          { handle intern constant functions in separate case }
          { handle intern constant functions in separate case }
          if p^.inlineconst then
          if p^.inlineconst then
           begin
           begin
-            is_real:=(p^.left^.treetype=realconstn);
+            isreal:=(p^.left^.treetype=realconstn);
             vl:=p^.left^.value;
             vl:=p^.left^.value;
             vr:=p^.left^.valued;
             vr:=p^.left^.valued;
             case p^.inlinenumber of
             case p^.inlinenumber of
          in_const_trunc : begin
          in_const_trunc : begin
-                            if is_real then
+                            if isreal then
                              hp:=genordinalconstnode(trunc(vr),s32bitdef)
                              hp:=genordinalconstnode(trunc(vr),s32bitdef)
                             else
                             else
                              hp:=genordinalconstnode(trunc(vl),s32bitdef);
                              hp:=genordinalconstnode(trunc(vl),s32bitdef);
                           end;
                           end;
          in_const_round : begin
          in_const_round : begin
-                            if is_real then
+                            if isreal then
                              hp:=genordinalconstnode(round(vr),s32bitdef)
                              hp:=genordinalconstnode(round(vr),s32bitdef)
                             else
                             else
                              hp:=genordinalconstnode(round(vl),s32bitdef);
                              hp:=genordinalconstnode(round(vl),s32bitdef);
                           end;
                           end;
           in_const_frac : begin
           in_const_frac : begin
-                            if is_real then
+                            if isreal then
                              hp:=genrealconstnode(frac(vr))
                              hp:=genrealconstnode(frac(vr))
                             else
                             else
                              hp:=genrealconstnode(frac(vl));
                              hp:=genrealconstnode(frac(vl));
                           end;
                           end;
            in_const_int : begin
            in_const_int : begin
-                            if is_real then
+                            if isreal then
                              hp:=genrealconstnode(int(vr))
                              hp:=genrealconstnode(int(vr))
                             else
                             else
                              hp:=genrealconstnode(int(vl));
                              hp:=genrealconstnode(int(vl));
                           end;
                           end;
            in_const_abs : begin
            in_const_abs : begin
-                            if is_real then
+                            if isreal then
                              hp:=genrealconstnode(abs(vr))
                              hp:=genrealconstnode(abs(vr))
                             else
                             else
                              hp:=genordinalconstnode(abs(vl),p^.left^.resulttype);
                              hp:=genordinalconstnode(abs(vl),p^.left^.resulttype);
                           end;
                           end;
            in_const_sqr : begin
            in_const_sqr : begin
-                            if is_real then
+                            if isreal then
                              hp:=genrealconstnode(sqr(vr))
                              hp:=genrealconstnode(sqr(vr))
                             else
                             else
                              hp:=genordinalconstnode(sqr(vl),p^.left^.resulttype);
                              hp:=genordinalconstnode(sqr(vl),p^.left^.resulttype);
                           end;
                           end;
            in_const_odd : begin
            in_const_odd : begin
-                            if is_real then
-                             Message(sym_e_type_mismatch)
+                            if isreal then
+                             Message(type_e_integer_expr_expected)
                             else
                             else
                              hp:=genordinalconstnode(byte(odd(vl)),booldef);
                              hp:=genordinalconstnode(byte(odd(vl)),booldef);
                           end;
                           end;
      in_const_swap_word : begin
      in_const_swap_word : begin
-                            if is_real then
-                             Message(sym_e_type_mismatch)
+                            if isreal then
+                             Message(type_e_integer_expr_expected)
                             else
                             else
                              hp:=genordinalconstnode((vl and $ff) shl 8+(vl shr 8),p^.left^.resulttype);
                              hp:=genordinalconstnode((vl and $ff) shl 8+(vl shr 8),p^.left^.resulttype);
                           end;
                           end;
      in_const_swap_long : begin
      in_const_swap_long : begin
-                            if is_real then
-                             Message(sym_e_type_mismatch)
+                            if isreal then
+                             Message(type_e_mismatch)
                             else
                             else
                              hp:=genordinalconstnode((vl and $ffff) shl 16+(vl shr 16),p^.left^.resulttype);
                              hp:=genordinalconstnode((vl and $ffff) shl 16+(vl shr 16),p^.left^.resulttype);
                           end;
                           end;
            in_const_ptr : begin
            in_const_ptr : begin
-                            if is_real then
-                             Message(sym_e_type_mismatch)
+                            if isreal then
+                             Message(type_e_mismatch)
                             else
                             else
                              hp:=genordinalconstnode(vl,voidpointerdef);
                              hp:=genordinalconstnode(vl,voidpointerdef);
                           end;
                           end;
@@ -3806,7 +3821,7 @@ unit pass_1;
                     p^.resulttype:=u16bitdef;
                     p^.resulttype:=u16bitdef;
                   p^.location.loc:=LOC_REGISTER;
                   p^.location.loc:=LOC_REGISTER;
                   if not is_integer(p^.left^.resulttype) then
                   if not is_integer(p^.left^.resulttype) then
-                    Message(sym_e_type_mismatch)
+                    Message(type_e_mismatch)
                   else
                   else
                     begin
                     begin
                       if p^.left^.treetype=ordconstn then
                       if p^.left^.treetype=ordconstn then
@@ -3871,7 +3886,7 @@ unit pass_1;
                            end
                            end
                          { can this happen ? }
                          { can this happen ? }
                          else if (porddef(p^.left^.resulttype)^.typ=uvoid) then
                          else if (porddef(p^.left^.resulttype)^.typ=uvoid) then
-                           Message(sym_e_type_mismatch)
+                           Message(type_e_mismatch)
                          else
                          else
                            { all other orddef need no transformation }
                            { all other orddef need no transformation }
                            begin
                            begin
@@ -3890,7 +3905,7 @@ unit pass_1;
                        else
                        else
                          begin
                          begin
                             { can anything else be ord() ?}
                             { can anything else be ord() ?}
-                            Message(sym_e_type_mismatch);
+                            Message(type_e_mismatch);
                          end;
                          end;
                     end;
                     end;
                end;
                end;
@@ -3944,12 +3959,12 @@ unit pass_1;
                   p^.resulttype:=p^.left^.resulttype;
                   p^.resulttype:=p^.left^.resulttype;
                   p^.location.loc:=LOC_REGISTER;
                   p^.location.loc:=LOC_REGISTER;
                   if not is_ordinal(p^.resulttype) then
                   if not is_ordinal(p^.resulttype) then
-                    Message(sym_e_type_mismatch)
+                    Message(type_e_ordinal_expr_expected)
                   else
                   else
                     begin
                     begin
                       if (p^.resulttype^.deftype=enumdef) and
                       if (p^.resulttype^.deftype=enumdef) and
                          (penumdef(p^.resulttype)^.has_jumps) then
                          (penumdef(p^.resulttype)^.has_jumps) then
-                        Message(parser_e_succ_and_pred_enums_with_assign_not_possible)
+                        Message(type_e_succ_and_pred_enums_with_assign_not_possible)
                       else
                       else
                         if p^.left^.treetype=ordconstn then
                         if p^.left^.treetype=ordconstn then
                          begin
                          begin
@@ -3973,13 +3988,11 @@ unit pass_1;
                       if codegenerror then
                       if codegenerror then
                        exit;
                        exit;
                       { first param must be var }
                       { first param must be var }
-                      if not (p^.left^.left^.location.loc in [LOC_MEM,LOC_REFERENCE]) then
-                        Message(cg_e_illegal_expression);
+                      if is_constnode(p^.left^.left) then
+                        Message(type_e_variable_id_expected);
                       { check type }
                       { check type }
                       if (p^.left^.resulttype^.deftype in [enumdef,pointerdef]) or
                       if (p^.left^.resulttype^.deftype in [enumdef,pointerdef]) or
-                         ((p^.left^.resulttype^.deftype=orddef) and
-                          (porddef(p^.left^.resulttype)^.typ in [uchar,bool8bit,u8bit,s8bit,
-                             bool16bit,u16bit,s16bit,bool32bit,u32bit,s32bit])) then
+                         is_ordinal(p^.left^.resulttype) then
                         begin
                         begin
                            { two paras ? }
                            { two paras ? }
                            if assigned(p^.left^.right) then
                            if assigned(p^.left^.right) then
@@ -3994,10 +4007,10 @@ unit pass_1;
                              end;
                              end;
                         end
                         end
                       else
                       else
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_ordinal_expr_expected);
                    end
                    end
                  else
                  else
-                   Message(sym_e_type_mismatch);
+                   Message(type_e_mismatch);
               end;
               end;
              in_read_x,
              in_read_x,
              in_readln_x,
              in_readln_x,
@@ -4033,45 +4046,78 @@ unit pass_1;
                                    { should we allow type conversion ? (PM)
                                    { should we allow type conversion ? (PM)
                                    if not isconvertable(hpp^.resulttype,
                                    if not isconvertable(hpp^.resulttype,
                                      pfiledef(hp^.resulttype)^.typed_as,convtyp,hpp^.treetype) then
                                      pfiledef(hp^.resulttype)^.typed_as,convtyp,hpp^.treetype) then
-                                     Message(sym_e_type_mismatch);
+                                     Message(type_e_mismatch);
                                    if not(is_equal(hpp^.resulttype,pfiledef(hp^.resulttype)^.typed_as)) then
                                    if not(is_equal(hpp^.resulttype,pfiledef(hp^.resulttype)^.typed_as)) then
                                      begin
                                      begin
                                         hpp^.left:=gentypeconvnode(hpp^.left,pfiledef(hp^.resulttype)^.typed_as);
                                         hpp^.left:=gentypeconvnode(hpp^.left,pfiledef(hp^.resulttype)^.typed_as);
                                      end; }
                                      end; }
                                    if not is_equal(hpp^.resulttype,pfiledef(hp^.resulttype)^.typed_as) then
                                    if not is_equal(hpp^.resulttype,pfiledef(hp^.resulttype)^.typed_as) then
-                                     Message(sym_e_type_mismatch);
+                                     Message(type_e_mismatch);
                                    hpp:=hpp^.right;
                                    hpp:=hpp^.right;
                                 end;
                                 end;
                               { once again for typeconversions }
                               { once again for typeconversions }
                               firstcallparan(p^.left,nil);
                               firstcallparan(p^.left,nil);
                            end;
                            end;
                          end; { endif assigned(hp) }
                          end; { endif assigned(hp) }
+
                        { insert type conversions for write(ln) }
                        { insert type conversions for write(ln) }
                        if (not file_is_typed) and
                        if (not file_is_typed) and
-                          ((p^.inlinenumber=in_write_x) or (p^.inlinenumber=in_writeln_x)) then
+                          ((p^.inlinenumber in [in_write_x,in_writeln_x,in_read_x,in_readln_x])) then
                          begin
                          begin
                             hp:=p^.left;
                             hp:=p^.left;
+                            dowrite:=(p^.inlinenumber in [in_write_x,in_writeln_x]);
                             while assigned(hp) do
                             while assigned(hp) do
                               begin
                               begin
                                 if assigned(hp^.left^.resulttype) then
                                 if assigned(hp^.left^.resulttype) then
                                   begin
                                   begin
-                                   if hp^.left^.resulttype^.deftype=floatdef then
-                                     begin
-                                        isreal:=true;
+                                    case hp^.left^.resulttype^.deftype of
+                                      filedef : begin
+                                                { only allowed as first parameter }
+                                                  if assigned(hp^.right) then
+                                                   Message(type_e_cant_read_write_type);
+                                                end;
+                                    stringdef : ;
+                                   pointerdef : begin
+                                                  if not is_equal(ppointerdef(hp^.left^.resulttype)^.definition,cchardef) then
+                                                    Message(type_e_cant_read_write_type);
+                                                end;
+                                     floatdef : begin
+                                                  isreal:=true;
+                                                end;
+                                       orddef : begin
+                                                  case porddef(hp^.left^.resulttype)^.typ of
+                                                     uchar,
+                                             u32bit,s32bit : ;
+                                               u8bit,s8bit,
+                                             u16bit,s16bit : if dowrite then
+                                                              hp^.left:=gentypeconvnode(hp^.left,s32bitdef);
+                                                  bool8bit,
+                                       bool16bit,bool32bit : if dowrite then
+                                                              hp^.left:=gentypeconvnode(hp^.left,booldef)
+                                                             else
+                                                              Message(type_e_cant_read_write_type);
+                                                  else
+                                                    Message(type_e_cant_read_write_type);
+                                                  end;
+                                                end;
+                                     arraydef : begin
+                                                  if not((parraydef(hp^.left^.resulttype)^.lowrange=0) and
+                                                         is_equal(parraydef(hp^.left^.resulttype)^.definition,cchardef)) then
+                                                   begin
+                                                   { but we convert only if the first index<>0,
+                                                     because in this case we have a ASCIIZ string }
+                                                     if dowrite and
+                                                        (parraydef(hp^.left^.resulttype)^.lowrange<>0) and
+                                                        (parraydef(hp^.left^.resulttype)^.definition^.deftype=orddef) and
+                                                        (porddef(parraydef(hp^.left^.resulttype)^.definition)^.typ=uchar) then
+                                                       hp^.left:=gentypeconvnode(hp^.left,cstringdef)
+                                                     else
+                                                       Message(type_e_cant_read_write_type);
+                                                   end;
+                                                end;
+                                     else
+                                       Message(type_e_cant_read_write_type);
                                      end
                                      end
-                                   else if hp^.left^.resulttype^.deftype=orddef then
-                                     case porddef(hp^.left^.resulttype)^.typ of
-                                         u8bit,s8bit,
-                                       u16bit,s16bit : hp^.left:=gentypeconvnode(hp^.left,s32bitdef);
-                                 bool16bit,bool32bit : hp^.left:=gentypeconvnode(hp^.left,booldef);
-                                     end
-                                   { but we convert only if the first index<>0, because in this case }
-                                   { we have a ASCIIZ string                                         }
-                                   else if (hp^.left^.resulttype^.deftype=arraydef) and
-                                           (parraydef(hp^.left^.resulttype)^.lowrange<>0) and
-                                           (parraydef(hp^.left^.resulttype)^.definition^.deftype=orddef) and
-                                           (porddef(parraydef(hp^.left^.resulttype)^.definition)^.typ=uchar) then
-                                     hp^.left:=gentypeconvnode(hp^.left,cstringdef);
                                   end;
                                   end;
                                  hp:=hp^.right;
                                  hp:=hp^.right;
                               end;
                               end;
@@ -4216,10 +4262,10 @@ unit pass_1;
                              end;
                              end;
                         end
                         end
                       else
                       else
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_mismatch);
                    end
                    end
                  else
                  else
-                   Message(sym_e_type_mismatch);
+                   Message(type_e_mismatch);
               end;
               end;
              in_low_x,in_high_x:
              in_low_x,in_high_x:
                begin
                begin
@@ -4277,11 +4323,11 @@ unit pass_1;
                               firstpass(p);
                               firstpass(p);
                            end;
                            end;
                          else
                          else
-                           Message(sym_e_type_mismatch);
+                           Message(type_e_mismatch);
                          end;
                          end;
                     end
                     end
                   else
                   else
-                    Message(parser_e_varid_or_typeid_expected);
+                    Message(type_e_varid_or_typeid_expected);
                end
                end
                  else internalerror(8);
                  else internalerror(8);
               end;
               end;
@@ -4404,7 +4450,7 @@ unit pass_1;
 
 
          { check the type }
          { check the type }
          if (p^.left^.resulttype=nil) or (p^.left^.resulttype^.deftype<>pointerdef) then
          if (p^.left^.resulttype=nil) or (p^.left^.resulttype^.deftype<>pointerdef) then
-           Message(parser_e_pointer_type_expected);
+           Message(type_e_pointer_type_expected);
 
 
          if (p^.left^.location.loc<>LOC_REFERENCE) {and
          if (p^.left^.location.loc<>LOC_REFERENCE) {and
             (p^.left^.location.loc<>LOC_CREGISTER)} then
             (p^.left^.location.loc<>LOC_CREGISTER)} then
@@ -4613,7 +4659,7 @@ unit pass_1;
          if not((p^.left^.resulttype^.deftype=orddef) and
          if not((p^.left^.resulttype^.deftype=orddef) and
             (porddef(p^.left^.resulttype)^.typ=bool8bit)) then
             (porddef(p^.left^.resulttype)^.typ=bool8bit)) then
             begin
             begin
-               Message(sym_e_type_mismatch);
+               Message(type_e_mismatch);
                exit;
                exit;
             end;
             end;
 
 
@@ -4661,7 +4707,7 @@ unit pass_1;
          if not((p^.left^.resulttype^.deftype=orddef) and
          if not((p^.left^.resulttype^.deftype=orddef) and
             (porddef(p^.left^.resulttype)^.typ in [bool8bit,bool16bit,bool32bit])) then
             (porddef(p^.left^.resulttype)^.typ in [bool8bit,bool16bit,bool32bit])) then
             begin
             begin
-               Message(sym_e_type_mismatch);
+               Message(type_e_mismatch);
                exit;
                exit;
             end;
             end;
 
 
@@ -4809,7 +4855,7 @@ unit pass_1;
           Message(cg_e_illegal_count_var);
           Message(cg_e_illegal_count_var);
 
 
          if (not(is_ordinal(p^.t2^.resulttype))) then
          if (not(is_ordinal(p^.t2^.resulttype))) then
-          Message(parser_e_ordinal_expected);
+          Message(type_e_ordinal_expr_expected);
 
 
          cleartempgen;
          cleartempgen;
          must_be_valid:=false;
          must_be_valid:=false;
@@ -5013,7 +5059,7 @@ unit pass_1;
          firstpass(p^.right);
          firstpass(p^.right);
 
 
          if (p^.right^.resulttype^.deftype<>classrefdef) then
          if (p^.right^.resulttype^.deftype<>classrefdef) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
          if codegenerror then
          if codegenerror then
            exit;
            exit;
 
 
@@ -5022,14 +5068,14 @@ unit pass_1;
          { left must be a class }
          { left must be a class }
          if (p^.left^.resulttype^.deftype<>objectdef) or
          if (p^.left^.resulttype^.deftype<>objectdef) or
            not(pobjectdef(p^.left^.resulttype)^.isclass) then
            not(pobjectdef(p^.left^.resulttype)^.isclass) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          { the operands must be related }
          { the operands must be related }
          if (not(pobjectdef(p^.left^.resulttype)^.isrelated(
          if (not(pobjectdef(p^.left^.resulttype)^.isrelated(
            pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)))) and
            pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)))) and
            (not(pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)^.isrelated(
            (not(pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)^.isrelated(
            pobjectdef(p^.left^.resulttype)))) then
            pobjectdef(p^.left^.resulttype)))) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          p^.location.loc:=LOC_FLAGS;
          p^.location.loc:=LOC_FLAGS;
          p^.resulttype:=booldef;
          p^.resulttype:=booldef;
@@ -5041,7 +5087,7 @@ unit pass_1;
          firstpass(p^.right);
          firstpass(p^.right);
          firstpass(p^.left);
          firstpass(p^.left);
          if (p^.right^.resulttype^.deftype<>classrefdef) then
          if (p^.right^.resulttype^.deftype<>classrefdef) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          if codegenerror then
          if codegenerror then
            exit;
            exit;
@@ -5051,14 +5097,14 @@ unit pass_1;
          { left must be a class }
          { left must be a class }
          if (p^.left^.resulttype^.deftype<>objectdef) or
          if (p^.left^.resulttype^.deftype<>objectdef) or
            not(pobjectdef(p^.left^.resulttype)^.isclass) then
            not(pobjectdef(p^.left^.resulttype)^.isclass) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          { the operands must be related }
          { the operands must be related }
          if (not(pobjectdef(p^.left^.resulttype)^.isrelated(
          if (not(pobjectdef(p^.left^.resulttype)^.isrelated(
            pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)))) and
            pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)))) and
            (not(pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)^.isrelated(
            (not(pobjectdef(pclassrefdef(p^.right^.resulttype)^.definition)^.isrelated(
            pobjectdef(p^.left^.resulttype)))) then
            pobjectdef(p^.left^.resulttype)))) then
-           Message(sym_e_type_mismatch);
+           Message(type_e_mismatch);
 
 
          p^.location:=p^.left^.location;
          p^.location:=p^.left^.location;
          p^.resulttype:=pclassrefdef(p^.right^.resulttype)^.definition;
          p^.resulttype:=pclassrefdef(p^.right^.resulttype)^.definition;
@@ -5089,7 +5135,7 @@ unit pass_1;
               { this must be a _class_ }
               { this must be a _class_ }
               if (p^.left^.resulttype^.deftype<>objectdef) or
               if (p^.left^.resulttype^.deftype<>objectdef) or
                 ((pobjectdef(p^.left^.resulttype)^.options and oois_class)=0) then
                 ((pobjectdef(p^.left^.resulttype)^.options and oois_class)=0) then
-                Message(sym_e_type_mismatch);
+                Message(type_e_mismatch);
 
 
               p^.registersfpu:=p^.left^.registersfpu;
               p^.registersfpu:=p^.left^.registersfpu;
               p^.registers32:=p^.left^.registers32;
               p^.registers32:=p^.left^.registers32;
@@ -5365,7 +5411,10 @@ unit pass_1;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.69  1998-09-01 17:39:47  peter
+  Revision 1.70  1998-09-04 08:42:00  peter
+    * updated some error messages
+
+  Revision 1.69  1998/09/01 17:39:47  peter
     + internal constant functions
     + internal constant functions
 
 
   Revision 1.68  1998/09/01 09:02:52  peter
   Revision 1.68  1998/09/01 09:02:52  peter

+ 12 - 9
compiler/pdecl.pas

@@ -129,7 +129,7 @@ unit pdecl;
                                       pd^:=p^.valued;
                                       pd^:=p^.valued;
                                       symtablestack^.insert(new(pconstsym,init(name,constreal,longint(pd),nil)));
                                       symtablestack^.insert(new(pconstsym,init(name,constreal,longint(pd),nil)));
                                    end;
                                    end;
-                      setconstrn : begin
+                       setconstn : begin
                                       new(ps);
                                       new(ps);
                                       ps^:=p^.constset^;
                                       ps^:=p^.constset^;
                                       symtablestack^.insert(new(pconstsym,init(name,
                                       symtablestack^.insert(new(pconstsym,init(name,
@@ -446,7 +446,7 @@ unit pdecl;
                   symtablestack^.insert(new(pvarsym,init(s,casedef)));
                   symtablestack^.insert(new(pvarsym,init(s,casedef)));
                 end;
                 end;
               if not is_ordinal(casedef) then
               if not is_ordinal(casedef) then
-               Message(parser_e_ordinal_expected);
+               Message(type_e_ordinal_expr_expected);
               consume(_OF);
               consume(_OF);
               startvarrec:=symtablestack^.datasize;
               startvarrec:=symtablestack^.datasize;
               repeat
               repeat
@@ -575,7 +575,7 @@ unit pdecl;
                 end;
                 end;
               if srsym^.typ<>typesym then
               if srsym^.typ<>typesym then
                 begin
                 begin
-                   Message(sym_e_type_id_expected);
+                   Message(type_e_type_id_expected);
                    lasttypesym:=ptypesym(srsym);
                    lasttypesym:=ptypesym(srsym);
                    id_type:=generrordef;
                    id_type:=generrordef;
                    exit;
                    exit;
@@ -1022,7 +1022,7 @@ unit pdecl;
                      end
                      end
                    else
                    else
                      begin
                      begin
-                        Message(parser_e_class_type_expected);
+                        Message(type_e_class_type_expected);
                         object_dec:=new(perrordef,init);
                         object_dec:=new(perrordef,init);
                      end;
                      end;
                    exit;
                    exit;
@@ -1061,7 +1061,7 @@ unit pdecl;
               childof:=pobjectdef(id_type(pattern));
               childof:=pobjectdef(id_type(pattern));
               if (childof^.deftype<>objectdef) then
               if (childof^.deftype<>objectdef) then
                  begin
                  begin
-                    Message(parser_e_class_type_expected);
+                    Message(type_e_class_type_expected);
                     childof:=nil;
                     childof:=nil;
                  end;
                  end;
                    { a mix of class and object isn't allowed }
                    { a mix of class and object isn't allowed }
@@ -1074,7 +1074,7 @@ unit pdecl;
                      correct field addresses
                      correct field addresses
                    }
                    }
                    if (childof^.options and oo_isforward)<>0 then
                    if (childof^.options and oo_isforward)<>0 then
-                     Message1(parser_forward_declaration_must_be_resolved,childof^.name^);
+                     Message1(parser_e_forward_declaration_must_be_resolved,childof^.name^);
                    fd^.childof:=childof;
                    fd^.childof:=childof;
                    aktclass:=fd;
                    aktclass:=fd;
                    { ajust the size, because the child could be also
                    { ajust the size, because the child could be also
@@ -1109,7 +1109,7 @@ unit pdecl;
                           correct field addresses
                           correct field addresses
                         }
                         }
                         if (childof^.options and oo_isforward)<>0 then
                         if (childof^.options and oo_isforward)<>0 then
-                          Message1(parser_forward_declaration_must_be_resolved,childof^.name^);
+                          Message1(parser_e_forward_declaration_must_be_resolved,childof^.name^);
                         aktclass:=fd;
                         aktclass:=fd;
                         aktclass^.childof:=childof;
                         aktclass^.childof:=childof;
                         { ajust the size, because the child could be also
                         { ajust the size, because the child could be also
@@ -1544,7 +1544,7 @@ unit pdecl;
                           if (pt1^.resulttype=pt2^.resulttype) then
                           if (pt1^.resulttype=pt2^.resulttype) then
                             p:=new(penumdef,init_subrange(penumdef(pt1^.resulttype),pt1^.value,pt2^.value))
                             p:=new(penumdef,init_subrange(penumdef(pt1^.resulttype),pt1^.value,pt2^.value))
                           else
                           else
-                            Message(sym_e_type_mismatch);
+                            Message(type_e_mismatch);
                         end
                         end
                        else
                        else
                         begin
                         begin
@@ -1969,7 +1969,10 @@ unit pdecl;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.47  1998-09-03 16:03:18  florian
+  Revision 1.48  1998-09-04 08:42:02  peter
+    * updated some error messages
+
+  Revision 1.47  1998/09/03 16:03:18  florian
     + rtti generation
     + rtti generation
     * init table generation changed
     * init table generation changed
 
 

+ 17 - 12
compiler/pexpr.pas

@@ -87,6 +87,8 @@ unit pexpr;
                 begin
                 begin
                    consume(COLON);
                    consume(COLON);
                    p1:=comp_expr(true);
                    p1:=comp_expr(true);
+                   if not is_constintnode(p1) then
+                    Message(type_e_integer_expr_expected);
                    p2:=gencallparanode(p1,p2);
                    p2:=gencallparanode(p1,p2);
                    p2^.is_colon_para:=true;
                    p2^.is_colon_para:=true;
                    if token=COLON then
                    if token=COLON then
@@ -147,7 +149,7 @@ unit pexpr;
                       begin
                       begin
                         if (p1^.resulttype=nil) then
                         if (p1^.resulttype=nil) then
                          begin
                          begin
-                           Message(sym_e_type_mismatch);
+                           Message(type_e_mismatch);
                            statement_syssym:=genzeronode(errorn);
                            statement_syssym:=genzeronode(errorn);
                          end
                          end
                         else
                         else
@@ -155,7 +157,7 @@ unit pexpr;
                           statement_syssym:=geninlinenode(in_typeof_x,false,p1)
                           statement_syssym:=geninlinenode(in_typeof_x,false,p1)
                         else
                         else
                          begin
                          begin
-                           Message(sym_e_type_mismatch);
+                           Message(type_e_mismatch);
                            statement_syssym:=genzeronode(errorn);
                            statement_syssym:=genzeronode(errorn);
                          end;
                          end;
                       end
                       end
@@ -165,7 +167,7 @@ unit pexpr;
                         do_firstpass(p1);
                         do_firstpass(p1);
                         if (p1^.resulttype=nil) then
                         if (p1^.resulttype=nil) then
                          begin
                          begin
-                           Message(sym_e_type_mismatch);
+                           Message(type_e_mismatch);
                            statement_syssym:=genzeronode(errorn)
                            statement_syssym:=genzeronode(errorn)
                          end
                          end
                         else
                         else
@@ -173,7 +175,7 @@ unit pexpr;
                           statement_syssym:=geninlinenode(in_typeof_x,false,p1)
                           statement_syssym:=geninlinenode(in_typeof_x,false,p1)
                         else
                         else
                          begin
                          begin
-                           Message(sym_e_type_mismatch);
+                           Message(type_e_mismatch);
                            statement_syssym:=genzeronode(errorn)
                            statement_syssym:=genzeronode(errorn)
                          end;
                          end;
                       end;
                       end;
@@ -553,7 +555,7 @@ unit pexpr;
                    else
                    else
                      begin
                      begin
                         p1:=genzeronode(errorn);
                         p1:=genzeronode(errorn);
-                        Message(sym_e_type_mismatch);
+                        Message(type_e_mismatch);
                      end;
                      end;
                 end
                 end
               else
               else
@@ -909,7 +911,7 @@ unit pexpr;
                               constchar : p1:=genordinalconstnode(pconstsym(srsym)^.value,cchardef);
                               constchar : p1:=genordinalconstnode(pconstsym(srsym)^.value,cchardef);
                               constreal : p1:=genrealconstnode(pbestreal(pconstsym(srsym)^.value)^);
                               constreal : p1:=genrealconstnode(pbestreal(pconstsym(srsym)^.value)^);
                               constbool : p1:=genordinalconstnode(pconstsym(srsym)^.value,booldef);
                               constbool : p1:=genordinalconstnode(pconstsym(srsym)^.value,booldef);
-                              constseta : p1:=gensetconstruktnode(pconstset(pconstsym(srsym)^.value),
+                              constseta : p1:=gensetconstnode(pconstset(pconstsym(srsym)^.value),
                                                 psetdef(pconstsym(srsym)^.definition));
                                                 psetdef(pconstsym(srsym)^.definition));
                                constord : p1:=genordinalconstnode(pconstsym(srsym)^.value,
                                constord : p1:=genordinalconstnode(pconstsym(srsym)^.value,
                                                 pconstsym(srsym)^.definition);
                                                 pconstsym(srsym)^.definition);
@@ -1015,7 +1017,7 @@ unit pexpr;
            FillChar(constset^,sizeof(constset^),0);
            FillChar(constset^,sizeof(constset^),0);
            constsetlo:=0;
            constsetlo:=0;
            constsethi:=0;
            constsethi:=0;
-           constp:=gensinglenode(setconstrn,nil);
+           constp:=gensinglenode(setconstn,nil);
            constp^.constset:=constset;
            constp^.constset:=constset;
            buildp:=constp;
            buildp:=constp;
            pd:=nil;
            pd:=nil;
@@ -1042,7 +1044,7 @@ unit pexpr;
                              pd:=p2^.resulttype;
                              pd:=p2^.resulttype;
                            if not(is_equal(pd,p2^.resulttype)) then
                            if not(is_equal(pd,p2^.resulttype)) then
                             begin
                             begin
-                              Message(parser_e_typeconflict_in_set);
+                              Message(type_e_typeconflict_in_set);
                               disposetree(p2);
                               disposetree(p2);
                             end
                             end
                            else
                            else
@@ -1061,7 +1063,7 @@ unit pexpr;
                                     do_firstpass(p3);
                                     do_firstpass(p3);
                                   end;
                                   end;
                                  if not(is_equal(pd,p3^.resulttype)) then
                                  if not(is_equal(pd,p3^.resulttype)) then
-                                   Message(parser_e_typeconflict_in_set)
+                                   Message(type_e_typeconflict_in_set)
                                  else
                                  else
                                    begin
                                    begin
                                      if (p2^.treetype=ordconstn) and (p3^.treetype=ordconstn) then
                                      if (p2^.treetype=ordconstn) and (p3^.treetype=ordconstn) then
@@ -1098,7 +1100,7 @@ unit pexpr;
                            if pd=nil then
                            if pd=nil then
                             pd:=cchardef;
                             pd:=cchardef;
                            if not(is_equal(pd,cchardef)) then
                            if not(is_equal(pd,cchardef)) then
-                            Message(parser_e_typeconflict_in_set)
+                            Message(type_e_typeconflict_in_set)
                            else
                            else
                             for l:=1 to length(pstring(p2^.values)^) do
                             for l:=1 to length(pstring(p2^.values)^) do
                              do_set(ord(pstring(p2^.values)^[l]));
                              do_set(ord(pstring(p2^.values)^[l]));
@@ -1384,7 +1386,7 @@ unit pexpr;
                  consume(LKLAMMER);
                  consume(LKLAMMER);
                  p1:=factor(false);
                  p1:=factor(false);
                  if p1^.treetype<>typen then
                  if p1^.treetype<>typen then
-                  Message(sym_e_type_id_expected);
+                  Message(type_e_type_id_expected);
                  pd:=p1^.resulttype;
                  pd:=p1^.resulttype;
                  pd2:=pd;
                  pd2:=pd;
                  if (pd^.deftype<>pointerdef) or
                  if (pd^.deftype<>pointerdef) or
@@ -1855,7 +1857,10 @@ unit pexpr;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.45  1998-09-01 17:39:49  peter
+  Revision 1.46  1998-09-04 08:42:03  peter
+    * updated some error messages
+
+  Revision 1.45  1998/09/01 17:39:49  peter
     + internal constant functions
     + internal constant functions
 
 
   Revision 1.44  1998/08/28 10:54:24  peter
   Revision 1.44  1998/08/28 10:54:24  peter

+ 9 - 6
compiler/pstatmnt.pas

@@ -176,7 +176,7 @@ unit pstatmnt;
          do_firstpass(caseexpr);
          do_firstpass(caseexpr);
          casedef:=caseexpr^.resulttype;
          casedef:=caseexpr^.resulttype;
          if not(is_ordinal(casedef)) then
          if not(is_ordinal(casedef)) then
-           Message(parser_e_ordinal_expected);
+           Message(type_e_ordinal_expr_expected);
 
 
          consume(_OF);
          consume(_OF);
          inc(statement_level);
          inc(statement_level);
@@ -560,7 +560,7 @@ unit pstatmnt;
                                  ot:=pobjectdef(ptypesym(srsym)^.definition)
                                  ot:=pobjectdef(ptypesym(srsym)^.definition)
                                else
                                else
                                  begin
                                  begin
-                                    message(parser_e_class_type_expected);
+                                    message(type_e_class_type_expected);
                                     ot:=pobjectdef(generrordef);
                                     ot:=pobjectdef(generrordef);
                                  end;
                                  end;
                                sym^.definition:=ot;
                                sym^.definition:=ot;
@@ -584,7 +584,7 @@ unit pstatmnt;
                                  ot:=pobjectdef(ptypesym(srsym)^.definition)
                                  ot:=pobjectdef(ptypesym(srsym)^.definition)
                                else
                                else
                                  begin
                                  begin
-                                    message(parser_e_class_type_expected);
+                                    message(type_e_class_type_expected);
                                     ot:=pobjectdef(generrordef);
                                     ot:=pobjectdef(generrordef);
                                  end;
                                  end;
                                exceptsymtable:=nil;
                                exceptsymtable:=nil;
@@ -792,7 +792,7 @@ unit pstatmnt;
                    pd2:=pd;
                    pd2:=pd;
                    if (p^.resulttype = nil) or (pd^.deftype<>pointerdef) then
                    if (p^.resulttype = nil) or (pd^.deftype<>pointerdef) then
                      begin
                      begin
-                        Message(parser_e_pointer_type_expected);
+                        Message(type_e_pointer_type_expected);
                         p:=factor(false);
                         p:=factor(false);
                         consume(RKLAMMER);
                         consume(RKLAMMER);
                         new_dispose_statement:=genzeronode(errorn);
                         new_dispose_statement:=genzeronode(errorn);
@@ -870,7 +870,7 @@ unit pstatmnt;
             begin
             begin
                if (p^.resulttype=nil) or (p^.resulttype^.deftype<>pointerdef) then
                if (p^.resulttype=nil) or (p^.resulttype^.deftype<>pointerdef) then
                  Begin
                  Begin
-                    Message(parser_e_pointer_type_expected);
+                    Message(type_e_pointer_type_expected);
                     new_dispose_statement:=genzeronode(errorn);
                     new_dispose_statement:=genzeronode(errorn);
                  end
                  end
                else
                else
@@ -1227,7 +1227,10 @@ unit pstatmnt;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.37  1998-08-21 14:08:52  pierre
+  Revision 1.38  1998-09-04 08:42:04  peter
+    * updated some error messages
+
+  Revision 1.37  1998/08/21 14:08:52  pierre
     + TEST_FUNCRET now default (old code removed)
     + TEST_FUNCRET now default (old code removed)
       works also for m68k (at least compiles)
       works also for m68k (at least compiles)
 
 

+ 8 - 5
compiler/ptconst.pas

@@ -210,7 +210,7 @@ unit ptconst;
            begin
            begin
               p:=comp_expr(true);
               p:=comp_expr(true);
               do_firstpass(p);
               do_firstpass(p);
-              if p^.treetype=setconstrn then
+              if p^.treetype=setconstn then
                 begin
                 begin
                    { we only allow const sets }
                    { we only allow const sets }
                    if assigned(p^.left) then
                    if assigned(p^.left) then
@@ -439,7 +439,7 @@ unit ptconst;
                      Message(parser_e_no_overloaded_procvars);
                      Message(parser_e_no_overloaded_procvars);
                    if not((pprocvardef(def)^.options=pd^.options)) or
                    if not((pprocvardef(def)^.options=pd^.options)) or
                      not(is_equal(pprocvardef(def)^.retdef,pd^.retdef)) then
                      not(is_equal(pprocvardef(def)^.retdef,pd^.retdef)) then
-                     Message(sym_e_type_mismatch)
+                     Message(type_e_mismatch)
                      else
                      else
                         begin
                         begin
                            hp1:=pprocvardef(def)^.para1;
                            hp1:=pprocvardef(def)^.para1;
@@ -449,14 +449,14 @@ unit ptconst;
                                 if not(is_equal(hp1^.data,hp2^.data)) or
                                 if not(is_equal(hp1^.data,hp2^.data)) or
                                    not(hp1^.paratyp=hp2^.paratyp) then
                                    not(hp1^.paratyp=hp2^.paratyp) then
                                   begin
                                   begin
-                                     Message(sym_e_type_mismatch);
+                                     Message(type_e_mismatch);
                                      break;
                                      break;
                                   end;
                                   end;
                                 hp1:=hp1^.next;
                                 hp1:=hp1^.next;
                                 hp2:=hp2^.next;
                                 hp2:=hp2^.next;
                              end;
                              end;
                            if not((hp1=nil) and (hp2=nil)) then
                            if not((hp1=nil) and (hp2=nil)) then
-                             Message(sym_e_type_mismatch);
+                             Message(type_e_mismatch);
                         end;
                         end;
                    datasegment^.concat(new(pai_const,init_symbol(strpnew(pd^.mangledname))));
                    datasegment^.concat(new(pai_const,init_symbol(strpnew(pd^.mangledname))));
                    if pd^.owner^.symtabletype=unitsymtable then
                    if pd^.owner^.symtabletype=unitsymtable then
@@ -512,7 +512,10 @@ unit ptconst;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.13  1998-09-01 09:05:36  peter
+  Revision 1.14  1998-09-04 08:42:07  peter
+    * updated some error messages
+
+  Revision 1.13  1998/09/01 09:05:36  peter
     * fixed string[4]='.library'
     * fixed string[4]='.library'
 
 
   Revision 1.12  1998/08/31 12:26:32  peter
   Revision 1.12  1998/08/31 12:26:32  peter

+ 5 - 2
compiler/ra386dir.pas

@@ -144,7 +144,7 @@ unit Ra386dir;
                                                pvarsym(sym)^.is_valid:=1
                                                pvarsym(sym)^.is_valid:=1
                                              else
                                              else
                                              if (pos('MOV',upper(s)) > 0) and (pvarsym(sym)^.is_valid=0) then
                                              if (pos('MOV',upper(s)) > 0) and (pvarsym(sym)^.is_valid=0) then
-                                              Message1(sym_n_local_var_not_init_yet,hs);
+                                              Message1(sym_n_uninitialized_local_variable,hs);
                                              hs:='-'+tostr(pvarsym(sym)^.address)+'('+att_reg2str[procinfo.framepointer]+')';
                                              hs:='-'+tostr(pvarsym(sym)^.address)+'('+att_reg2str[procinfo.framepointer]+')';
                                              end
                                              end
                                            else
                                            else
@@ -262,7 +262,10 @@ unit Ra386dir;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  1998-09-03 17:39:05  florian
+  Revision 1.8  1998-09-04 08:42:08  peter
+    * updated some error messages
+
+  Revision 1.7  1998/09/03 17:39:05  florian
     + better code for type conversation longint/dword to real type
     + better code for type conversation longint/dword to real type
 
 
   Revision 1.6  1998/09/03 17:08:47  pierre
   Revision 1.6  1998/09/03 17:08:47  pierre

+ 21 - 20
compiler/tree.pas

@@ -94,7 +94,7 @@ unit tree;
                    newn,            {The new operation, constructor call.}
                    newn,            {The new operation, constructor call.}
                    simpledisposen,  {The dispose operation.}
                    simpledisposen,  {The dispose operation.}
                    setelementn,     {A set element(s) (i.e. [a,b] and also [a..b]).}
                    setelementn,     {A set element(s) (i.e. [a,b] and also [a..b]).}
-                   setconstrn,      {A set constant (i.e. [1,2]).}
+                   setconstn,       {A set constant (i.e. [1,2]).}
                    blockn,          {A block of statements.}
                    blockn,          {A block of statements.}
                    statementn,      {One statement in a block of nodes.}
                    statementn,      {One statement in a block of nodes.}
                    loopn,           { used in genloopnode, must be converted }
                    loopn,           { used in genloopnode, must be converted }
@@ -226,7 +226,7 @@ unit tree;
              inlinen : (inlinenumber : longint;inlineconst:boolean);
              inlinen : (inlinenumber : longint;inlineconst:boolean);
              procinlinen : (inlineprocdef : pprocdef;
              procinlinen : (inlineprocdef : pprocdef;
                             retoffset,para_offset,para_size : longint);
                             retoffset,para_offset,para_size : longint);
-             setconstrn : (constset : pconstset);
+             setconstn : (constset : pconstset);
              loopn : (t1,t2 : ptree;backward : boolean);
              loopn : (t1,t2 : ptree;backward : boolean);
              asmn : (p_asm : paasmoutput;object_preserved : boolean);
              asmn : (p_asm : paasmoutput;object_preserved : boolean);
              casen : (nodes : pcaserecord;elseblock : ptree);
              casen : (nodes : pcaserecord;elseblock : ptree);
@@ -263,7 +263,7 @@ unit tree;
     function gentypedconstloadnode(sym : ptypedconstsym;st : psymtable) : ptree;
     function gentypedconstloadnode(sym : ptypedconstsym;st : psymtable) : ptree;
     function genenumnode(v : penumsym) : ptree;
     function genenumnode(v : penumsym) : ptree;
     function genselfnode(_class : pdef) : ptree;
     function genselfnode(_class : pdef) : ptree;
-    function gensetconstruktnode(s : pconstset;settype : psetdef) : ptree;
+    function gensetconstnode(s : pconstset;settype : psetdef) : ptree;
     function genloopnode(t : ttreetyp;l,r,n1: ptree;back : boolean) : ptree;
     function genloopnode(t : ttreetyp;l,r,n1: ptree;back : boolean) : ptree;
     function genasmnode(p_asm : paasmoutput) : ptree;
     function genasmnode(p_asm : paasmoutput) : ptree;
     function gencasenode(l,r : ptree;nodes : pcaserecord) : ptree;
     function gencasenode(l,r : ptree;nodes : pcaserecord) : ptree;
@@ -291,9 +291,9 @@ unit tree;
     { keinen ordinalen Wert hat, wird ein Fehler erzeugt        }
     { keinen ordinalen Wert hat, wird ein Fehler erzeugt        }
     function get_ordinal_value(p : ptree) : longint;
     function get_ordinal_value(p : ptree) : longint;
 
 
+    function is_constnode(p : ptree) : boolean;
     { true, if p is a pointer to a const int value }
     { true, if p is a pointer to a const int value }
     function is_constintnode(p : ptree) : boolean;
     function is_constintnode(p : ptree) : boolean;
-    { like is_constintnode }
     function is_constboolnode(p : ptree) : boolean;
     function is_constboolnode(p : ptree) : boolean;
     function is_constrealnode(p : ptree) : boolean;
     function is_constrealnode(p : ptree) : boolean;
     function is_constcharnode(p : ptree) : boolean;
     function is_constcharnode(p : ptree) : boolean;
@@ -333,7 +333,7 @@ unit tree;
          case p^.treetype of
          case p^.treetype of
           asmn : if assigned(p^.p_asm) then
           asmn : if assigned(p^.p_asm) then
                   dispose(p^.p_asm,done);
                   dispose(p^.p_asm,done);
-    setconstrn : if assigned(p^.constset) then
+     setconstn : if assigned(p^.constset) then
                   dispose(p^.constset);
                   dispose(p^.constset);
          end;
          end;
          { reference info }
          { reference info }
@@ -1130,7 +1130,7 @@ unit tree;
          genprocinlinenode:=p;
          genprocinlinenode:=p;
       end;
       end;
 
 
-   function gensetconstruktnode(s : pconstset;settype : psetdef) : ptree;
+   function gensetconstnode(s : pconstset;settype : psetdef) : ptree;
 
 
      var
      var
         p : ptree;
         p : ptree;
@@ -1138,7 +1138,7 @@ unit tree;
      begin
      begin
         p:=getnode;
         p:=getnode;
         p^.disposetyp:=dt_constset;
         p^.disposetyp:=dt_constset;
-        p^.treetype:=setconstrn;
+        p^.treetype:=setconstn;
         p^.registers32:=0;
         p^.registers32:=0;
         p^.registersfpu:=0;
         p^.registersfpu:=0;
 {$ifdef SUPPORT_MMX}
 {$ifdef SUPPORT_MMX}
@@ -1148,7 +1148,7 @@ unit tree;
          p^.left:=nil;
          p^.left:=nil;
          new(p^.constset);
          new(p^.constset);
          p^.constset^:=s^;
          p^.constset^:=s^;
-         gensetconstruktnode:=p;
+         gensetconstnode:=p;
       end;
       end;
 
 
 {$ifdef extdebug}
 {$ifdef extdebug}
@@ -1513,22 +1513,22 @@ unit tree;
          if p^.treetype=ordconstn then
          if p^.treetype=ordconstn then
            get_ordinal_value:=p^.value
            get_ordinal_value:=p^.value
          else
          else
-           Message(parser_e_ordinal_expected);
+           Message(type_e_ordinal_expr_expected);
       end;
       end;
 
 
 
 
-    function is_constintnode(p : ptree) : boolean;
+    function is_constnode(p : ptree) : boolean;
+      begin
+        is_constnode:=(p^.treetype in [ordconstn,realconstn,stringconstn,fixconstn,setconstn]);
+      end;
+
 
 
+    function is_constintnode(p : ptree) : boolean;
       begin
       begin
-         {DM: According to me, an orddef with anysize, is
-          a correct constintnode. Anyway I commented changed s32bit check,
-          because it caused problems with statements like a:=high(word).}
-         is_constintnode:=((p^.treetype=ordconstn) and
-           (p^.resulttype^.deftype=orddef) and
-           (porddef(p^.resulttype)^.typ in [u8bit,s8bit,u16bit,s16bit,
-            u32bit,s32bit,uauto]));
+         is_constintnode:=(p^.treetype=ordconstn) and is_integer(p^.resulttype);
       end;
       end;
 
 
+
     function is_constcharnode(p : ptree) : boolean;
     function is_constcharnode(p : ptree) : boolean;
 
 
       begin
       begin
@@ -1556,7 +1556,10 @@ unit tree;
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.34  1998-09-01 17:39:54  peter
+  Revision 1.35  1998-09-04 08:42:11  peter
+    * updated some error messages
+
+  Revision 1.34  1998/09/01 17:39:54  peter
     + internal constant functions
     + internal constant functions
 
 
   Revision 1.33  1998/08/28 12:51:44  florian
   Revision 1.33  1998/08/28 12:51:44  florian
@@ -1631,8 +1634,6 @@ end.
   Revision 1.13  1998/06/04 09:55:49  pierre
   Revision 1.13  1998/06/04 09:55:49  pierre
     * demangled name of procsym reworked to become independant of the mangling scheme
     * demangled name of procsym reworked to become independant of the mangling scheme
 
 
-  Come test_funcret improvements (not yet working)S: ----------------------------------------------------------------------
-
   Revision 1.12  1998/06/03 22:49:06  peter
   Revision 1.12  1998/06/03 22:49:06  peter
     + wordbool,longbool
     + wordbool,longbool
     * rename bis,von -> high,low
     * rename bis,von -> high,low