Selaa lähdekoodia

* do not use crt by default, reduced wrong fails hopefully

git-svn-id: trunk@38345 -
florian 7 vuotta sitten
vanhempi
commit
70519c0837
1 muutettua tiedostoa jossa 11 lisäystä ja 1 poistoa
  1. 11 1
      tests/tbs/tb0013.pp

+ 11 - 1
tests/tbs/tb0013.pp

@@ -3,8 +3,10 @@
 
 { %skiptarget=wince }
 
+{$ifdef usecrt}
   uses
      crt;
+{$endif usecrt}
 
   const
      { ... parameters }
@@ -44,7 +46,8 @@
        i,j : longint;
 
     begin
-       for i:=0 to w do
+{$ifdef usecrt}
+      for i:=0 to w do
          for j:=0 to h do
            begin
               textcolor(white);
@@ -54,6 +57,7 @@
               gotoxy(i*7+1,j*2+2);
               writeln(phi[i,j]:6:3);
            end;
+{$endif usecrt}
     end;
 
   procedure calc_phi;
@@ -146,7 +150,9 @@
      habs,sigma_phi : double;
 
   begin
+{$ifdef usecrt}
      clrscr;
+{$endif usecrt}
      iter:=0;
      { setup boundary conditions }
      for i:=0 to w do
@@ -184,13 +190,17 @@
               sigma_phi:=sigma_phi+abs(phi[i,j]);
            end;
        adapt(mi,mj);
+{$ifdef usecrt}
        gotoxy(1,23);
        textcolor(white);
        writeln(iter,' iterations, sigma_phi=',sigma_phi);
+{$endif usecrt}
      until {keypressed or }(sigma_phi<0.5);
      draw;
+{$ifdef usecrt}
      gotoxy(1,23);
      textcolor(white);
+{$endif usecrt}
      writeln(iter,' iterations, sigma_phi=',sigma_phi);
      {writeln('press a key');
      if readkey=#0 then