Does it work?

Line Continuation Character

This post is an old one migrated from my early years blog:

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 and VS (.vbs): _ (underscore)

Leave a Reply

%d bloggers like this: