WHILE problems
My program reads a file, converts each line to uppercase and then adds each line to a vector. Its meant to exit the program if no STOP statement is found in the whole file. If a STOP statement is found it should go on to the next part of the program which reads each line of the file and performs if statements on them.
On the file I'm testing it with, there is a STOP statement on the last line. It finds this STOP statement (as it returned 10 on the last line). But "no STOP statement" is still printed and the program doesn't run on to the next while loop.
Any ideas?!
while (( line=file.readLine() ) !=null)
{
countE++;
lineUp = line.toUpperCase();
lines.addElement(lineUp);
}
if (lines.indexOf("STOP") == -1);
{
System.out.println("ERROR [line "+countE+"]: no STOP statement");
System.exit(0);
}
while (( line=file.readLine() ) !=null)
{
linecount++;

