A B+ tree storing unique sorted LONG keys. It provides disk-friendly ordered-set semantics and supports iteration and conversion to an array.
A B+ tree storing unique sorted LONG keys. It provides disk-friendly ordered-set semantics and supports iteration and conversion to an array.
Kind: Container | Category: H-Lib Native Containers
PBXB64 Status: AVAILABLE
PBXB64 Certification: [CERTIFIED TESTED]
This H-Lib container is implemented in native C support code and exposed through PBXB64 BASIC container syntax. The examples below are focused usage patterns; keep handles valid, release each container with its Final method, and check counts or return values when a method can fail.
| Method | Signature | Returns | Description |
|---|---|---|---|
| New | t.New order | LNBPTREE | Erzeugt einen leeren B+-Baum mit dem erforderlichen Verzweigungsgrad. |
| Final | t.Final | none | Free the B+ tree. |
| Validate | t.Validate | LONG | Non-zero if the handle is valid. |
| Clear | t.Clear | none | Remove all keys. |
| Count | t.Count | LONG | Number of keys. |
| Capacity | t.Capacity | QUAD | Aktuelle logische Speicherkapazität. |
| Trim | t.Trim | none | Gibt ungenutzten Speicher frei. |
| Clone | t.Clone | LNBPTREE | Gibt eine unabhängige Kopie mit demselben Verzweigungsgrad zurück. |
| Add | t.Add key | none | Insert a key. |
| Remove | t.Remove key | none | Remove a key. |
| Contains | t.Contains key | LONG | Non-zero if the key is present. |
| First | t.First | QUAD | Return the smallest key (0 if empty). |
| Next | t.Next key | QUAD | Return the next larger key (0 if none). |
| Empty | t.Empty | LONG | Non-zero if the B+ tree is empty. |
| ToArray | t.ToArray | LNARR | Return a new LNARR of keys in sorted order. |
| Range | t.Range low, high | LNARR | Gibt die Schlüssel im inklusiven Bereich sortiert zurück. |
Validation evidence: H-Lib container behavior is exercised by registered BASIC container validation programs and the embedded H-Lib object set used by the single-EXE validation gate.
Typ- und Variablenseiten sollen Breite, Vorzeichen, Initialisierung, Gültigkeitsbereich, Suffixregeln und x64-Layout dokumentieren. Beispiele sollen gespeicherten Wert, ausgelesenen Wert und Konvertierungs- oder Überlaufverhalten belegen.
Nennen Sie, ob Deklarationen #DIM ALL, AS-Klauseln, Suffixe oder ausdrückliche Sichtbarkeit benötigen. Trennen Sie lokalen, statischen, globalen und thread-lokalen Speicher.
Prüfen Sie Pointer-, Handle- und LONG-Annahmen beim Wechsel von 32-Bit-PB-Code zu PBXB64.
Wenn eine Seite mehrere verwandte Formen gruppiert, sollte sie sagen, welche Form die Speicherbreite festlegt, welche nur die Deklarationssyntax ändert und welche nur historischen Charakter hat. Eine kleine Zuordnung von Familienbegriff zu den konkreten Typseiten macht die Seite beim Portieren deutlich nützlicher.
LOCAL t AS LNBPTREE t = t.New 4 t.Add 5 t.Add 2 t.Add 8 PRINT t.First ' 2 t.Final