Shl/de: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Shl/de
| Old | New | Line | |
|---|---|---|---|
| 1 | + | Zurück zu den [[Reserved words/de|reservierten Wörtern]]. | |
| 2 | + | ||
| 3 | + | Das reservierte Wort <b>shl</b> gehört zu den reservierten Wörtern. | |
| 4 | + | ||
| 5 | + | Das reservierte Wort <b>shl</b> gehört zu den Operatoren. | |
| 6 | + | ||
| 7 | + | Das reservierte Wort <b>shl</b> arbeitet wie ein Multiplikator. | |
| 8 | + | ||
| 9 | + | Das reservierte Wort <b>shl</b> kann nur auf Ganzzahlen angewendet werden. | |
| 10 | + | ||
| 11 | + | Das Ergebnis ist eine Ganzzahl. | |
| 12 | + | ||
| 13 | + | Beispiele: | |
| 14 | + | ||
| 15 | + | ``` pascal | |
| 16 | + | var | |
| 17 | + | intA: integer; | |
| 18 | + | intB: integer; | |
| 19 | + | ||
| 20 | + | begin | |
| 21 | + | ... | |
| 22 | + | intA := 2; | |
| 23 | + | intB := intA shl 1; // Ergebnis: 4 entspricht intA * 2 | |
| 24 | + | intB := intA shl 2; // Ergebnis: 8 entspricht (intA * 2 * 2) oder (intA * 4) | |
| 25 | + | intB := intA shl 3; // Ergebnis: 16 entspricht (intA * 2 * 2 * 2) oder (intA * 8) | |
| 26 | + | ... | |
| 27 | + | end; | |
| 28 | + | ``` | |
| 29 | + | ||
| 30 | + | Siehe auch: [[Shr/de|shr]] | |
| 31 | + | ||
| 32 | + | --- | |
| 33 | + | *From the Free Pascal wiki, page "Shl/de", as it stood on 2020-02-26 after a change by Trev, 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).* |
