Difference between revisions of "Dollar sign"
m (page layout) |
|||
Line 26: | Line 26: | ||
== other appearances == | == other appearances == | ||
− | For [[FPC]] and [[Delphi]] compilers, the dollar sign appears in compiler directives of the form <syntaxhighlight lang="pascal" enclose="none">{$directive}</syntaxhighlight>. | + | For [[FPC]] and [[Delphi]] [[Compiler|compilers]], the dollar sign appears in [[Compiler directive|compiler directives]] of the form <syntaxhighlight lang="pascal" enclose="none">{$directive}</syntaxhighlight>. |
{{Symbols}} | {{Symbols}} |
Revision as of 18:03, 5 April 2019
│
English (en) │
suomi (fi) │
français (fr) │
português (pt) │
русский (ru) │
In ASCII, the character code decimal 36
(or hexadecimal 24
) is defined to be $
(dollar sign).
Pascal
The symbol $
, pronounced “dollar sign”, is used in Pascal to indicate a hexadecimal base.
program dollarSignDemo(input, output, stderr);
var
i: longint;
begin
// '$' as well as '0x' are recognized by readLn
// as hexadecimal base prefixes
readStr('$24', i);
writeLn(i); // will print 36
writeLn(-$24); // will print -36
end.
An optional sign is written in front the base indicator.
other appearances
For FPC and Delphi compilers, the dollar sign appears in compiler directives of the form {$directive}
.
single characters |
|
character pairs |
|