Line Continuation Character

1 05 2008

This post is no longer maintained. Click here for the updated version of this post

In this post I list the new line character for batch scripts, Makefile files and VBScript scripts.

A while ago I spent a lot of time for finding information about which character was the line continuation character in a Windows batch script.
The line continuation character allows us to split a line of code in multiple lines while letting the command interpreter know that the current command is not ending upon newline but is going on in the next line.
This is particularly useful if you want to format your scripts to make them more readable.
Here is a list of newline line continuation characters in few scripting languages:

  1. Batch (.bat): ^ (caret)
  2. Nmake (Makefile): \ (backslash)
  3. VBScript (.vbs): _ (underscore)