MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | int last_bit(string str); |
| 3 | |
| 4 | BESCHREIBUNG |
| 5 | Liefert die Nummer des letzten gesetzten Bits im Bitstring <str>. |
| 6 | |
| 7 | Jedes Zeichen enthaelt 6 Bits. Also kann in jedem Zeichen ein Wert von |
| 8 | 0 bis 63 gespeichert werden (2^6=64). Das erste Zeichen ist der |
| 9 | Leerschlag " " mit dem Wert 0. Das erste Zeichen im String ist jenes |
| 10 | mit den niedrigsten Bits (0-5). |
| 11 | |
| 12 | BEISPIEL |
| 13 | string s; |
| 14 | s = set_bit("", 4); s = set_bit(s, 2); |
| 15 | last_bit(s) --> liefert 4 |
| 16 | |
| 17 | SIEHE AUCH |
| 18 | set_bit(E), clear_bit(E), next_bit(E), test_bit(E), count_bits(E), |
| 19 | and_bits(E), or_bits(E), xor_bits(E), invert_bits(E), copy_bits(E) |