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

Control strings in Delphi extend your text-based toolkit

Delphi Tool Palette.

Cryptic strings like 13#10 appear regularly within Delphi source code. These strings aren't random gibberish, however — they serve an essential purpose for text layout.

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.

For example, to assign a two-line string to a Caption property of a TLabel control, use the following pseudocode:

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 of the CR (carriage return) value; #10 represents LF (line feed).

Two more interesting control characters include:

  • #0 — NULL character
  • #9 — (horizontal) TAB
Format
mla apa chicago
Your Citation
Gajic, Zarko. "What does #13#10 stand for, in Delphi code?" ThoughtCo, Aug. 25, 2020, thoughtco.com/what-is-1310-in-delphi-code-1057547. Gajic, Zarko. (2020, August 25). What does #13#10 stand for, in Delphi code? Retrieved from https://www.thoughtco.com/what-is-1310-in-delphi-code-1057547 Gajic, Zarko. "What does #13#10 stand for, in Delphi code?" ThoughtCo. https://www.thoughtco.com/what-is-1310-in-delphi-code-1057547 (accessed March 19, 2024).