Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.3.1 Interpolation in Double-quoted Strings

Interpolation is a special process whereby certain special strings written in ASCII are replaced by something different. In2.1.1 Single-quoted Strings, we noted that certain sequences in single-quoted strings (namely, \\ and \') were treateddifferently. This is very similar to what happens with interpolation. For example, in interpolated double-quoted strings, various sequences preceded by a `\' character act different.

Here is a chart of the most common of these:

String Interpolated As
`\\' an actual, single backslash character
`\$' a single $ character
`\@' a single @ character
`\t' tab
`\n' newline
`\r' hard return
`\f' form feed
`\b' backspace
`\a' alarm (bell)
`\e' escape
`\033' character represented by octal value, 033
`\x1b' character represented by hexadecimal value, 1b


 
 
  Published under the terms of the GNU General Public License Design by Interspire