Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Blank lines at end of scripts
02-18-2014, 08:11 PM,
#5
RE: Blank lines at end of scripts
I always use the plain old "vi" editor, and in the majority of scripts from the WebERP source, it shows "[noeol]" on the status line, showing that the last line has no end-of-line character. This could mean that the file was originally in DOS format - even if you run the dos2unix command on it it will still leave the last line unterminated. Merely saving the file in "vi" will automatically add the expected end-of-line character, unless you specifically change the "vi" configuration to tell it otherwise.

It would like to think that whatever technology is used should be robust enough not to be thrown out by addition of extra whitespace, but if it is, so be it - I make sure that there are no spaces or blank lines after the closing tab. But if the "noeol" format - which I have not seen used in any other projects - is an attempt to prevent the problems mentioned, then I think this is mistaken; the end-of-line character itself should be quite safe according to the official PHP documentation, which says :

"The closing tag for the block will include the immediately trailing newline if one is present".
Reply


Messages In This Thread
Blank lines at end of scripts - by Forums - 01-24-2014, 08:53 PM
RE: Blank lines at end of scripts - by tomglare - 02-13-2014, 08:22 PM
RE: Blank lines at end of scripts - by Forums - 02-15-2014, 11:04 PM
RE: Blank lines at end of scripts - by TurboPT - 02-18-2014, 12:45 AM
RE: Blank lines at end of scripts - by tomglare - 02-18-2014, 08:11 PM
RE: Blank lines at end of scripts - by Forums - 02-18-2014, 08:36 PM
RE: Blank lines at end of scripts - by tomglare - 02-18-2014, 09:35 PM
RE: Blank lines at end of scripts - by Forums - 02-18-2014, 10:23 PM
RE: Blank lines at end of scripts - by opto - 02-19-2014, 05:28 PM
RE: Blank lines at end of scripts - by icedlava - 02-23-2014, 04:18 PM
RE: Blank lines at end of scripts - by phil - 02-26-2014, 05:51 PM
RE: Blank lines at end of scripts - by Forums - 02-26-2014, 07:03 PM
RE: Blank lines at end of scripts - by phil - 02-26-2014, 07:06 PM
RE: Blank lines at end of scripts - by Forums - 02-26-2014, 07:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)