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

git-svn-id: trunk@38345 -
This commit is contained in:
florian 2018-02-25 15:34:15 +00:00
parent c5f8567ed7
commit 70519c0837

View File

@ -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