I was just wondering if there was any kind of JavaScript/VBScript/ASP or
HTML code that could produce a blank line. One thing I just realized I
could do is copy the program and then remove some code and gradually add it
back in, maybe then I could narrow down the code to find out what is causing
the blank line.
3 Ignore the numbers until you find out what they are for!
5
If it were me (and it frequently is with my CGI scripts) I would *add* a
4 line of code to output something obvious, perhaps a "z" or a †
right at the start of the program (or after the HTTP header, if you
2 generate this). Make sure your addition is at the top of the page.
Then move the new line of code down through your program in steps until
the new z/dagger appears after the space. Now move the new line upwards
in smaller steps until the gap re-appears. Repeat using ever smaller
steps until you have isolated the precise line of your code that is
causing the problem.
1 If you make the first step in the process half the size of your code,
and each successive step half the size of the previous one, this is
known as a "binary search" and will find the problem in the hugest
program within 12 steps. (Someone now steps in and says their program
contains more than 4096 lines).
The beauty of adding just one line is that your program remains intact;
you don't risk deleting a bunch of stuff then accidentally pressing
"save" rather than "save as". It also means that your process continues
to work if this one program is part of a suite executed in sequence.
To give you an idea of how this works, I've put numbers at the beginning
of lines in this post, as if this were the program, to demonstrate the
steps. You find the first blank line in 5 steps!
--
Steve Swift
http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk