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