Difference between revisions of "Dollar sign"
m (substitute legacy syntaxhighlight syntax) |
(attribute origin of hex-base) |
||
Line 7: | Line 7: | ||
== Pascal == | == Pascal == | ||
− | + | As a <abbr title="Pascal extension for scientific computing">PXSC</abbr>-extension, the symbol <syntaxhighlight lang="pascal" inline>$</syntaxhighlight>, pronounced “dollar sign”, is used to indicate a [[Hexadecimal|hexadecimal]] base. | |
<br style="clear:both" /> | <br style="clear:both" /> | ||
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> |
Revision as of 23:57, 3 February 2021
│
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
As a PXSC-extension, the symbol $
, pronounced “dollar sign”, is used 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 |
|