Sign in Join
Wiki copytemporary

Dollar sign/pt: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-<div style="float:left; margin: 0 25px 20px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;">
2-
31\$
4-
5-</div>
62
73Em [[ASCII/pt|ASCII]], o código decimal de caractere `36` (ou hexadecimal `24`) é definido para ser `$` (sinal de dólar).
84
95## Pascal
106
117O símbolo `$`, pronúnciado “sinal de dólar”, é usado em [[Pascal/pt|Pascal]] para indicar uma base [[Hexadecimal/pt|hexadecimal]].\
128
139``` pascal
1410program dollarSignDemo(input, output, stderr);
1511
1612var
1713 i: longint;
1814
1915begin
2016 // '$' bem como '0x' são reconhecidos por readLn
2117 // como prefixos de base hexadecimal
2218 readStr('$24', i);
2319 writeLn(i); // will print 36
2420 writeLn(-$24); // will print -36
2521end.
2622```
2723
2824Um sinal opcional é escrito na frente do indicador de base.
2925
3026## Outras situações
3127
3228Nos compiladores [[FPC/pt|FPC]] e [[Delphi/pt|Delphi]], o sinal de dólar aparece em [[Compiler directive/pt|diretivas de compilação]] da forma `{$directive}`.
3329
3430---
3531*From the Free Pascal wiki, page "Dollar sign/pt", as it stood on 2022-08-06 after a change by Kai Burghardt, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history