Sign in Join
Wiki copytemporary

Shortint/fi: what changed

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

Title: Shortint/fi

OldNewLine
1+Shortint on etumerkillinen kokonaisluku -128 ja 127 väliltä. Shortint on 8 bittiä pitkä.
2+
3+Myös [[Byte/fi|byte]] datatyyppi on 8 bittiä pitkä. Mutta byte datatyyppi on etumerkitön tyyppi ja se merkitsee sitä että se voi esittää numerot 0 ja 255 väliltä.
4+
5+``` pascal
6+
7+var
8+ a_shortint: shortint;
9+ a_byte : byte;
10+ s1, s2 : string;
11+begin
12+ a_shortint := %11110001; // binary number
13+ a_byte := %11110001;
14+ s1 := IntToStr(a_shortint); // s1 = '-15'
15+ s2 := IntToStr(a_byte); // s2 = '241'
16+```
17+
18+## Katso myös
19+
20+- [[Not|function OnesComplement2]]
21+- [[Smallint]] on etumerkillinen kokonaisluku -32768 ja 32767 väliltä
22+- [[Binary numeral system/fi|binaarinumerot]]
23+- [[IntToStr]] muuntaa kokonaisluvun merkkijonoksi
24+
25+---
26+*From the Free Pascal wiki, page "Shortint/fi", as it stood on 2020-01-29 after a change by Bart, 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