G
G
GeorgeKay2018-07-06 15:15:28
Delphi
GeorgeKay, 2018-07-06 15:15:28

What is the effect of these @ & % # ^ characters in delphi or pascal?

Passed the test, there was a question: <<Hot key>> for the items of the Main menu components in delphi can be added using the symbol:
[email protected]
2.#
3.%
4.^
5.&
The correct answer was &. And I want to know what other signs can mean?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2018-07-06
@Mercury13

This symbol is not Delphi, but Win32. I don’t know how the hot key is set up in other OSes, but in Qt, under all OSes, the hot key is set in the same way, with an ampersand. The Turbo Vision text system had ~H~otkey.
These symbols have no special meaning in Win32 windows. But they can be carried somewhere else, you understand:
• on some sites #hashtag or @user
• in lines like printf, a percentage is a wildcard like “Hello,% s”
• and what is the meaning of all these characters in Pascal - you and so should know.

K
kalapanga, 2018-07-06
@kalapanga

I think for the test, except for one correct one, the remaining four characters were simply chosen "from the bulldozer". But in principle, all of them can really be found in the code.
@ and ^ - when working with pointers
# - when specifying characters by their codes, like: s := 'Hello' + #13#10;
% - highlights, for example, the format specifiers of the Format function: Writeln(Format('%d%%', [100])); // displays '100%'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question