Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3933348
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:35:26+00:00 2026-05-19T23:35:26+00:00

Let me explain by an example. In Delphi, you can write procedure TForm1.FormKeyPress(Sender: TObject;

  • 0

Let me explain by an example. In Delphi, you can write

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = ^C then
    ShowMessage('The user wants to copy something.')
  else if Key = ^V then
    ShowMessage('The user wants to paste.')
end;

to check for Ctrl+C and Ctrl+V keyboard commands. In fact, the same syntax works for Ctrl+A, where A is any character, and — of course — you can also use a case statement instead of ifs. You can even do ShowMessage(^A), so, apparently, ^A is considered a char.

However, when browsing the official Delphi documentation, I cannot find any reference to this syntax. But maybe the ^A syntax is so common that it is understood as a part of the underlying plain text file format? Or is it simply an undocumented feature of the Delphi programming language? (Notice that the above constructions are actually used in the RTL/VCL source code. But, of course, Embarcadero, and Embarcadero alone, is allowed to use undocumented features, if any such exists.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:35:26+00:00Added an answer on May 19, 2026 at 11:35 pm

    This is from long ago as an escape character to enable you to have consts for control characters in a more readable way.

    const
      CtrlC = ^C;
    begin
      Write(Ord(CtrlC));
    end.
    

    This defines a Char constant with value #3, then writes 3 in Borland Pascal 7, and I remember seeing it years before that too.

    I just checked the Turbo Pascal 5.0 and Borland Pascal 7.0 languages guides, but could not find it, so it seems undocumented.

    Edit:
    I do remember this was a Borland thing, and just checked: it is not part of the ISO Pascal standard (formerly this was ANSI Pascal Standard, thanks Sertac for noticing this).

    It is documented in the Free Pascal documentation.

    SGI uses the backslash as escape character, as per their docs.

    More Edit: I found it documented in Delphi in a Nutshell and the Delphi Basics site.

    Found it: Just found it on page 37 of the Turbo Pascal 3 Reference Manual.

    –jeroen

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me explain best with an example. Say you have node class that can
Let me try to explain by example. Say website is hosted at example.com (NOT
The easiest way to explain my question may be with an example, so let
Let me explain my problem, and hopefully someone can offer some good advice. I
Let me explain what I mean in my title. Let's say, that for example
This might seem phrased oddly at first, but let me explain through example. Note
Let me explain with an example. If n=4 and r=2 that means all 4
First let me explain you what I mean by a nested transaction. Example: say
Let me explain what I am asking for by an example. Imagine I have
It looks that Model hook beforeDelete don't work hierarchialy. Let me explain with example.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.