Revision 1 of 3, by Kai Burghardt on 8-6-2022. The page as it is now.
Percent sign/fi
<div style="float:right; margin: 0 25px 20px 0; padding:40px; font-size:500%; font-family: Georgia; background-color: #f9f9f9; border: 2px solid #777777;">
%
</div>
ASCII:ssa ja Unicodessa merkkikoodiarvo joka on desimaalisena 37 (tai heksadesimaalisena 25) määritellään % .
Symbolia % (lausutaan "prosenttimerkki") käytetään Pascalissa:
- ilmaisemaan binäärisen luvun /-numeron.
Prosenttiluku näkyy myös Lazaruksen IDE -direktiiveissä, jotka ovat muotoa {%directive}
Esimerkki
program simple_binary_digit;
var b:byte;
begin
b := %1010011;
writeln (b);
writeln (binStr(b,8));
writeln ;
writeln ('Paina [Enter] lopettaaksesi');
readln;
end.Ulostulona saadaan seuraavaa:
83
01010011
Paina [Enter] lopettaaksesi
Katso myös
- funktiobinStr - muuntaa kokonaisluvun (integer) string merkkijonon binääriesitykseksi.
From the Free Pascal wiki, page "Percent sign/fi", 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.
