Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 days ago.
Improve this question
I am currently writing my code to develop a grid over an airfoil in 2-D. Within one of my nested DO loops, i keep getting the "unclassified statement at (1)", no matter the bounds for the ELSE statement. Please see below for a copy of the nested loop.
!This will determine x-spacing over top of the airfoil`
DO j=1,nodes
DO i=rem+1,nodes-rem
IF (i<(nodes-rem)-((JLair-1)/2)) THEN
x(i,j)=c*(EXP(Kappaairfoil*((i-(rem+1))/(JLair-1.0)))-1.0)/(EXP(Kappaairfoil)-1.0)
ELSE IF (i==(nodes-1)/2+1) THEN
x(i,j)=c/2.0
ELSE
x(i,j)=c*(EXP(Kappaairfoil*((nodes-(rem+1)-i))/(kJLair-1.0)))-1.0)/(EXP(Kappaairfoil)-1.0)
END IF
END DO
END DO
However, when I run the code, I receive the following error:
gridspacing_2.f95:84:7:
84 | x(i,j)=c*(EXP(Kappaairfoil*((nodes-(rem+1)-i))/(kJLair-1.0)))-1.0)/(EXP(Kappaairfoil)-1.0)
| 1
Error: Unclassifiable statement at (1)
I have been able to get the code to not throw the error if I simply set x(i,j) equal to c, or very simple functions, but when I try to apply the full Rakich stretching function, I immediately receive the unclassified statement error. I appreciate you taking the time to read my problem, Any help is greatly appreciated.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
This question seems to be related to Error: Expected variable in READ statement at (1)
but it is not the same, since I have declared the variables.
program read_matrix
integer :: m(3,3),n(3), i, j
open(1001, file='data1.txt')
do i = 1, 3
read(1001,*) (m(i,j), (j=1,3))
end do
end program read_matrix
data1.txt is
1 2 3
4 5 6
7 8 9
10
I used gfortran to compile the above fortran code, and got
read-1.f90:7.16:
read(1001,*) (m(i,j), (j=1,3))
1
Error: Expected variable in READ statement at (1)
Hence, I am wondering what is the reason for it. Thanks.
Your implied-do loop is wrong. Look at the parentheses. Here what you want
read(1001,*) (m(i,j), j=1, 3)
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
My code was converted to these random characters at some point after I saved my program using Vi. I did this project for a grade in one of my college courses and didn’t get any credit, despite the fact that I spent hours working on my code for this to happen. If anyone knows how to convert it back to C++ I would be thankful.
Turns out I had saved my file under the wrong folder and I was able to recover my original file. Thanks to all for helping out with this! It seems like it always tends to be something so simple...
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
I get this while trying to compile my C++ program
error: stray ‘\342’ in program
���func("a","b",3,0);
^
But when I paste from Atom (the text editor I use) I get this
func("a","b",3,0);
I need to add that I pasted this from WhatsApp web and there are 40 lines like this that would take way too long to rewrite. I would like to know what and where the bad character is.
More code:
func("a","b",3,0);
func("c","d",1,3);
You are answering your question by yourself. The error shows you, that the first 3 whitespaces are causing the trouble. To fix this, try something like regex or the "search and replace" function to replace the "wrong" whitespaces with the correct ones.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I am extremely new to programming (my second week in) and I am trying to understand why when I start without debugging, I keep receiving this error message!
I only receive one error and it is the "c2059" 'return' error code.. It's not descriptive at all, so I have no idea what I did wrong.
I have a picture link available below through google drive to show my code. Any help offered is greatly appreciated!
https://drive.google.com/file/d/0B5hXFZn11VsudXBXRlI3Vjg1OEU/view?usp=sharing
I am also fairly new to this site, if I am breaking any formal etiquette, please let me know as well..
I am using Microsoft Visual Studio 2008.
You have some stray text (endl/) at the end of the second last line, which is causing a parsing error.
You also appear to have typed return o; (the letter "o") - as you don't have a variable called o this will also cause an error. I suspect you meant return 0; instead.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
double testpower;
testpower = pow(400,-9);
testpower giving me 3.8146972656250003e-024 which is different calculator output of 4E-7
Anyone have any idea why??
calculator output of 4E-7
You entered the wrong calculation into your calculator.
You entered 400×10-9, instead of 400-9.
These are absolutely not the same thing!
The C++ program is correct: pow(400, -9) calculates 400-9, which is approximately 3.815×10-24.
Here is some further reading for you:
http://en.wikipedia.org/wiki/Scientific_notation#E_notation
4E-7 seems like you accidentally input 400 * 10^-9 or 400E-9.
You're looking for 400^-9, which should give 3.8146972656250003e-024.
The result you are getting 3.8146972656250003e-024 is completely correct. Maybe your calculator does not have that precission and that is why you are getting that error. Try to do 1/400^9.
I just tested 400^(-9) on the Windows calculator tool and I got the same output as your program. I think the program is fine, it may be your manual calculation that is the problem here.