Browse Source

+ also support 'external near' var declarations on i8086

git-svn-id: trunk@37536 -
nickysn 7 years ago
parent
commit
49a96af874
1 changed files with 8 additions and 4 deletions
  1. 8 4
      compiler/pdecvar.pas

+ 8 - 4
compiler/pdecvar.pas

@@ -924,10 +924,14 @@ implementation
          try_to_consume(_EXTERNAL) then
         begin
           is_external_var:=true;
-          { far? }
-          if (target_info.system in systems_allow_external_far_var) and
-             try_to_consume(_FAR) then
-            is_far:=true;
+          { near/far? }
+          if target_info.system in systems_allow_external_far_var then
+            begin
+              if try_to_consume(_FAR) then
+                is_far:=true
+              else if try_to_consume(_NEAR) then
+                is_far:=false;
+            end;
           if (idtoken<>_NAME) and (token<>_SEMICOLON) then
             begin
               is_dll:=true;