- #1
charlie87
- 8
- 0
Hello,
I am pretty new to programming at all and am having some issues with working out why this program is not compiling:
Program MAIN
DO J = 1, 11
K = 10 + J
P = 0.4 !POSITION OF MAXIMUM CAMBER AT 40% CHORD!
M = FLOAT (J + 1)* 0.01 !MAXIMUM CAMBER!
DO I = 1, 11
DO X = 0, 1
DX = 1
IF (X .LT. P) THEN
Yc = (M/(P*P))*(2*P*X-(X*X))
ELSE
Yc = (M/((1-P)*(1-P))*((1-(2*P))+(2*P*X)-(X*X)))
END IF
DYc = Yc(I) - (Yc(I - 1))
FIRST = 0.2969*SQRT(X)
SECOND = 0.1260*X
THIRD = 0.3516*X*X
FOURTH = 0.2843*X*X*X
FIFTH = 0.1015*X*X*X*X
Yt = (T/0.2)*(FIRST - SECOND - THIRD + FOURTH - FIFTH)
THETA = ATAN(DYc/DX)
Yupper = Yc + (Yt*COS(THETA))
Ylower = Yc - (Yt*COS(THETA))
END DO
END DO
WRITE (J, *)
DO I = 1, 11
X(I), Yupper(I), Ylower(I)
END DO
END DO
The code in bold red font are the problem lines and the compiler gives me an "Unclassifiable statement" error for both lines.
Any help would be very much appreciated.
Regards,
Charlie
I am pretty new to programming at all and am having some issues with working out why this program is not compiling:
Program MAIN
DO J = 1, 11
K = 10 + J
P = 0.4 !POSITION OF MAXIMUM CAMBER AT 40% CHORD!
M = FLOAT (J + 1)* 0.01 !MAXIMUM CAMBER!
DO I = 1, 11
DO X = 0, 1
DX = 1
IF (X .LT. P) THEN
Yc = (M/(P*P))*(2*P*X-(X*X))
ELSE
Yc = (M/((1-P)*(1-P))*((1-(2*P))+(2*P*X)-(X*X)))
END IF
DYc = Yc(I) - (Yc(I - 1))
FIRST = 0.2969*SQRT(X)
SECOND = 0.1260*X
THIRD = 0.3516*X*X
FOURTH = 0.2843*X*X*X
FIFTH = 0.1015*X*X*X*X
Yt = (T/0.2)*(FIRST - SECOND - THIRD + FOURTH - FIFTH)
THETA = ATAN(DYc/DX)
Yupper = Yc + (Yt*COS(THETA))
Ylower = Yc - (Yt*COS(THETA))
END DO
END DO
WRITE (J, *)
DO I = 1, 11
X(I), Yupper(I), Ylower(I)
END DO
END DO
The code in bold red font are the problem lines and the compiler gives me an "Unclassifiable statement" error for both lines.
Any help would be very much appreciated.
Regards,
Charlie