Sign in Join
Wiki copytemporary

Percent 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:right; 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 caractere de código decimal `37` (ou [[Hexadecimal/pt|hexadecimal]] `25`) é definido como `%`.
84
95O símbolo `%` ("sinal de porcentagem") é utilizado em [[Pascal/pt|Pascal]]:
106
117- indica um [[Binary numeral system/pt|número/expressão no sistema numérico binário]].
128
139O sinal de porcentagem também aparece nas diretivas do Lazarus da forma `{%directive}`.
1410
1511## Exemplo
1612
1713``` pascal
1814
1915program digito_binario_simples;
2016
2117var b:byte;
2218begin
2319 b := %1010011;
2420 writeln (b);
2521 writeln (binStr(b,8));
2622 writeln ;
2723 writeln ('Tecle [Enter] para sair');
2824 readln;
2925end.
3026```
3127
3228Será impresso na saída algo como:
3329
3430`83`\
3531`01010011`\
3632` `\
3733`Tecle [Enter] para sair`
3834
3935> **Note:** Literais de números binários não são suportados nos modos [[Mode Delphi/pt|{$mode Delphi}]] e [[Mode TP/pt|{$mode TP}]].
4036
4137## Ver também
4238
4339- `function` [[doc:rtl/system/binstr.html|binStr]] — Converte um *[[Integer/pt|Integer]]* (inteiro) para uma [[String/pt|String]] contendo a sua representação binária.
4440
4541---
4642*From the Free Pascal wiki, page "Percent 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