|
Заблокирован |
||||
|
1 |
||||
|
04.10.2014, 18:53. Показов 1173. Ответов 6 Метки ошибка 207, сопроцессор, стек (Все метки)
Итак ошибка 207. Я просмотрел на форуме целый
__________________
0 |
|
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
04.10.2014, 18:53 |
|
6 |
|
bormant Модератор
7480 / 4352 / 2771 Регистрация: 22.11.2013 Сообщений: 12,478 Записей в блоге: 1 |
||||
|
04.10.2014, 19:29 |
2 |
|||
|
hoch,
1 |
|
Puporev Почетный модератор 64270 / 47569 / 32739 Регистрация: 18.05.2008 Сообщений: 115,182 |
||||
|
04.10.2014, 19:37 |
3 |
|||
|
Вроде так.
В Турбо Паскале часто этот трюк приходится использовать.
1 |
|
Заблокирован |
|
|
04.10.2014, 19:45 [ТС] |
4 |
|
Bormant Добавлено через 6 минут
0 |
|
3028 / 1914 / 1649 Регистрация: 30.04.2011 Сообщений: 3,060 |
|
|
04.10.2014, 20:47 |
5 |
|
А как узнать включён у меня сопроцессор или нет? Для этого в редакторе Turbo Pascal нажмите комбинацию клавиш Ctrl + O, O. В редакторе появится список состояний директив. Если в списке присутствует N+ — значит включен, а если N- — значит выключен.
1 |
|
Модератор
7480 / 4352 / 2771 Регистрация: 22.11.2013 Сообщений: 12,478 Записей в блоге: 1 |
|
|
04.10.2014, 22:04 |
6 |
|
Если используется компилятор командной строки, обычно достаточно запустить его без параметров или с ключом -? или -h, чтобы узнать используемые умолчания.
1 |
|
Заблокирован |
|
|
05.10.2014, 08:40 [ТС] |
7 |
|
Ребята,
0 |
|
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
05.10.2014, 08:40 |
|
Помогаю со студенческими работами здесь
Error 207 при вычислении выражения Ошибка при вычислении функции, деление на ноль. function Myfunc(a,eps:real):real;
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: 7 |
I’m trying to make a program to find the determinant of a matrix like this :
program determinan;
uses crt;
type
arr=array of array of real;
var
mat:arr;
uk:byte;
procedure ukuran(var x:arr;var n:byte);
begin
write('Masukkan ukuran matriks : ');readln(n);
setlength(x,n+1,n+1);
end;
procedure masuk(var x:arr;n:byte);
var
i,j:byte;
begin
writeln('Masukkan elemen matriks : ');
for i:= 1 to n do
for j:= 1 to n do
begin
write('E(',i,',',j,'):');
read(x[i,j]);
end;
end;
procedure tulis(x:arr;n:byte;nama:string);
var
i,j:byte;
begin
writeln('Matriks ',nama,' : ');
for i:= 1 to n do
begin
for j:=1 to n do
write(x[i,j]:0:0,' ');
writeln;
end;
end;
procedure segitiga(var x:arr;n:byte);
var
i,j,k:byte;
nano :real;
begin
for i:=1 to n-1 do
for j:=i+1 to n do
begin
nano:=x[j,i]/x[i,i];
for k:=i to n do x[j,k]:=x[j,k]-nano*x[i,k];
end;
end;
function determinan(x:arr;n:byte):real;
var
i:byte;
begin
determinan:=1;
for i:=1 to n do
determinan:=determinan*x[i,i];
end;
begin
clrscr;
writeln('-----------------------------');
writeln('Program Menghitung Determinan');
writeln('-----------------------------');
ukuran(mat,uk);
masuk(mat,uk);writeln;
tulis(mat,uk,'asal');writeln;
segitiga(mat,uk);
tulis(mat,uk,'segitiga atas');writeln;
writeln('Determinan : ',determinan(mat,uk):0:0);
readkey;
end.
But, if I input with 3×3 matrix with elements (1,1,1;1,1,1;1,1,1) it will be exit with error 207. It’s also happened if I try to input matrix with same colum element. But, it not happened in 2×2 matrix. Please, tell me what is the reason of such behavior because I can’t fund it
Recommended Answers
Well the answer would be more evident if you debugged it.
You tell me what the values of each part of that line works out to be, so Z, ln(Z), etc.. you tell me which bit fails.. and what the values are.
Are you really using turbo pascal …
Jump to Post
All 4 Replies

LizR
171
Posting Virtuoso
14 Years Ago
Well the answer would be more evident if you debugged it.
You tell me what the values of each part of that line works out to be, so Z, ln(Z), etc.. you tell me which bit fails.. and what the values are.
Are you really using turbo pascal from the 80s? or do you mean the turbo delphi products?

14 Years Ago
Yes the compiler i used is Turbo Pascal unfortunately i checked if the CubeRoot & SquareRoot are computing correctly so i tested them turns out
Ex when input X = 4
The result:
SquareRoot := Sqrt(X); { Turn out correct 2.0000000000E+00 }
T1 := Trunc(X); { also correct 2 }
D1 := SquareRoot - T1; { is correct 0.0000000000E+00 }
{but with the cube is a different story }
CubeRoot := Exp( V * Ln(Z) ); { Turn out correct 1.5874010520E+00 }
T2 := Trunc(X); { also correct }
D2 := CubeRoot - T2; { is not correct 5.8740105200E-00 it should come out
{ 0.58740105200E+00 }
I also try to use the same program with Dev Pascal its seem to have the same problem with D1 🙁 it would seem that i cant calculate both of them in the same place
Edited
9 Years Ago
by happygeek because:
fixed formatting

LizR
171
Posting Virtuoso
14 Years Ago
Forgive my denseness (its past 11, and Im about to go to bed but..)
5.8740105200E-00 = 0.58740105200E+00
as 5.8740105200E surely is 0.587… just as 0.587E+00 is also 0.587….

14 Years Ago
I discovered that u have to seperate the two operation of square root and cube root and it worked and i changed the compiler thanks for the help 😈
Reply to this topic
Be a part of the DaniWeb community
We’re a friendly, industry-focused community of developers, IT pros, digital marketers,
and technology enthusiasts meeting, networking, learning, and sharing knowledge.

Ошибка 207 при вычислении выражения