Questions tagged [unexpectendoffile]
50 questions
18
votes
4 answers
Mismatched parentheses: a quick way to find them?
I just rearranged a very large JavaScript file. I now get "Unexpected end of input." Somewhere in those hundred of functions, one has lost (or gained) a bracket. What's the quickest way to find it?

Chris Tolworthy
- 2,066
- 4
- 20
- 24
5
votes
3 answers
in bash script unexpected "syntax error: unexpected end of file" on if statement
W/hen i run the following code snippet
#!/bin/bash
if [ "foo" = "foo" ];
then
echo "true"
else
echo "false"
fi
echo "end"
i get
sfm_write_buffer_test.sh: line 9: syntax error: unexpected end of file
this doesn't make any sense. echo statements…

bicepjai
- 1,615
- 3
- 17
- 35
5
votes
2 answers
PHP Heredoc unexpected end of file error
I'm using a Heredoc in order to save a very large block of HTML to a variable so I can send it as an email. However, I keep getting an unexpected end of file syntax error. I've already checked for whitespace before the closing Heredoc tag and other…

mongy910
- 537
- 1
- 5
- 16
4
votes
2 answers
How to properly handle blank, null, or empty lines in C#
I have some C# code that is working with a text file, and i can not seem to get it to work properly with blank or null (whitespace) lines.
My code:
while (!file.EndOfStream)
{
line = file.ReadLine();
bool…

Drifter64
- 1,103
- 3
- 11
- 30
3
votes
1 answer
java can not read a line from file
I'm reading a file with the following piece of code:
Scanner in = new Scanner(new File(fileName));
while (in.hasNextLine()) {
String[] line = in.nextLine().trim().split("[ \t]");
.
.
.
}
When I open the file…

ayyoob imani
- 639
- 7
- 16
3
votes
1 answer
.bashrc unexpected end of file
I've searched and found several answers but I didn't succeed in altering mine.
Operating system : Mac OS X
My .bashrc content
# Before other PATHs...
PATH=${PATH}:/usr/local/share/python
alias la='ls -la'
function find_cpp_filepath_with_string {…

serj
- 508
- 4
- 20
3
votes
1 answer
Git Filter-branch doesn't remove folders?
I wanted to convert most of my repositories from my own SVN-server onto a hosted remote Git-server. I found a couple of commands and turned them into an automated shell script in order to convert the repositories in a smoother way.
Anyhow, that all…

blacksnipe
- 41
- 4
2
votes
1 answer
Unexpected End of File in FORTRAN?
I've been looking on the net but I haven't found any solution yet.
I'm trying to read from a .neu (neutral format) file, which is a type of file generated by the Gambit software, and contains information about a mesh used in CFD calculations.
The…

André Almeida
- 379
- 1
- 4
- 11
2
votes
2 answers
PHP: "unexpected $end" in the middle of a file
When I try to run this page (video.php), I get the following error:
Parse error: syntax error, unexpected $end in /base/path/masked/inc/functions.php on line 37
The strange thing is "functions.php" has more than 37 lines... why is it detecting an…

Tim F.
- 35
- 5
1
vote
2 answers
Unexpected type error while deleting an object
I have an ArrayList of EnemyVehicle objects. Its name is enemies. When I try to delete an object of EnemyVehicle class, just like in this question, I get unexpected type error:
required: valuable
found: value
That's my code:
private void…

Emre
- 933
- 15
- 27
1
vote
3 answers
Why this program stops unexpectedly in the middle of the input
i have written this code for a question on codechef (A4)....when i give the input:
2
4 2
This program stops unexpectedly without taking further input ....can some please point out the mistake in the code?
#include
#include
void…

P parker
- 81
- 1
- 4
1
vote
1 answer
Unexpected end-of-file in visual form
Getting error, when trying to run code. I am using Visual Forms. VS 2013
#include "MyForm.h"
using namespace System;
using namespace System::Windows::Forms;
[STAThread]
int main(array^ args)
{
Application::EnableVisualStyles();
…

Entrack
- 51
- 1
- 1
- 10
1
vote
2 answers
Why does MSVC++ give my an error if I try to compile a header into an include without a newline? (C++/Windows)
I'm using MSVC++ to program a simple window, and I included a resource file for a menu along the lines of:
MYMENU MENU DISCARDABLE
//etc.
and I created a header file "resourcedef.h" with definitions like
#define ID_MYMENU_FILE_CLOSE 1002
I can…
user98188
1
vote
1 answer
Learning how to create blog via RoR, and got unexpected content on index page
i'm just started making blog via RoR, using blog-from-scratch guide and i've got some unexpected content on my index page. Here is the picture:
http://i.minus.com/ibpnYRmlPv7IW3.png
Some hash-like string under the title is that unexpected…

Aleksei Anatskii
- 307
- 4
- 9
1
vote
1 answer
!fileName! (String variable) was unexpected at this time in batch?
I'm running a batch file that:
1. Go thru ALL *.properties files in C:\ExecutionSDKTest_10.2.2
2. Run them
3. compare line by line of the outputted log with ref log
But the cmd.exe keeps throwing me this error: "!fileName! was unexpected at this…

jerryh91
- 1,777
- 10
- 46
- 77