1. Home
  2. Computing & Technology
  3. Delphi Programming

What does #13#10 stand for, in Delphi code?

By , About.com Guide

You've certainly seen "#13#10" many times in Delphi source code. If you are wondering what those characters stand for, here's the answer:

A control string is a sequence of one or more control characters, each of which consists of the # symbol followed by an unsigned integer constant from 0 to 255 (decimal or hexadecimal) and denotes the corresponding ASCII character.

When you want to, for example, assign a two-line string to a Caption property (of a TLabel control), you can use the following "code:"

Label1.Caption := 'First line' + #13#10 + 'Second line';

The "#13#10" part represents a carriage-return + line-feed combination. The "#13" is the ASCII equivalent to the CR (carriage return) value; #10 represents LF (line feed).

Two more interesting control characters are:
#0 - NULL character and
#9 - (horizontal) TAB

Note: here's how to translate a virtual-key to ASCII code.

Delphi tips navigator:
» How to exchange Bitmap images between two TImageList components
« How to set the DataSource property to several db-aware controls in one call

More Delphi Programming Quick Tips
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2005 Delphi Tips
  7. What does #13#10 stand for, in Delphi code?

©2009 About.com, a part of The New York Times Company.

All rights reserved.