Re: Fortran Code to Pascal Code
- From: Tim Prince <timothyprince@xxxxxxxxxxxxx>
- Date: Mon, 15 May 2006 13:45:40 GMT
williamdiazs wrote:
I need to write tthe following in Pascal :Are you accounting for the reversal of subscript order from Fortran to Pascal?
While this compiles without any problems, I get errors with
this part of code :
IN FORTRAN
real eig(36,5,5,5), diff(36), scores(5)
col = 4
row = 1
do i=1,5
scores(i) = sum(eig(1:36,col,row,i)*diff)
end do
In PASCAL
col := 4
row := 1
for i:= 1 to 5 do
begin
tempsum := 0.0;
for j:=1 to 36 do
begin
tempsum := tempsum + eig[j,col,row,i]*diff[j];
end;
scores[i] := tempsum;
end;
The scores array get different values IN PASCAL with the same data
Where is the error?
Thanks
.
- Follow-Ups:
- Re: Fortran Code to Pascal Code
- From: williamdiazs
- Re: Fortran Code to Pascal Code
- References:
- Fortran Code to Pascal Code
- From: williamdiazs
- Fortran Code to Pascal Code
- Prev by Date: Fortran Code to Pascal Code
- Next by Date: Re: Fortran Code to Pascal Code
- Previous by thread: Fortran Code to Pascal Code
- Next by thread: Re: Fortran Code to Pascal Code
- Index(es):
Relevant Pages
|
Loading