A multiset stores LONG keys together with their multiplicities (occurrence counts).
A multiset stores LONG keys together with their multiplicities (occurrence counts).
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 | m.New | LNMULTISET | Allocate a new empty multiset. |
| Final | m.Final | none | Free the multiset. |
| Validate | m.Validate | LONG | Non-zero if the handle is valid. |
| Clear | m.Clear | none | Remove all keys. |
| Count | m.Count | LONG | Gesamtzahl aller gespeicherten Vorkommen. |
| Capacity | m.Capacity | QUAD | Aktuelle Speicherkapazität. |
| Trim | m.Trim | none | Gibt ungenutzte Kapazität frei. |
| Clone | m.Clone | LNMULTISET | Gibt eine unabhängige Kopie zurück. |
| Add | m.Add key | none | Add one occurrence of a key. |
| Remove | m.Remove key | none | Remove one occurrence of a key. |
| RemoveAll | m.RemoveAll key | none | Remove a key entirely. |
| Contains | m.Contains key | LONG | Non-zero if the key has any occurrence. |
| Multiplicity | m.Multiplicity key | LONG | Gibt die Anzahl der Vorkommen eines Werts zurück. |
| First | m.First | QUAD | Return the first distinct key (0 if empty). |
| Next | m.Next key | QUAD | Return the next distinct key (0 if none). |
| Empty | m.Empty | LONG | Non-zero if the multiset is empty. |
| ToArray | m.ToArray | LNARR | Return a new LNARR of distinct keys. |
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.
Diese Referenzseite soll durch ein fokussiertes Compile- oder Laufzeitbeispiel belegt sein. Das Beispiel soll Eingaben, erwartete Ausgabe oder Exit-Code und erforderliche Windows-Ressourcen oder Include-Dateien nennen.
Allgemeine Übersichtsseiten sollten trotzdem sagen, welche Familie gemeint ist, welche konkreten Befehlsseiten die Implementierung tragen und welche Formen nur der Navigation dienen. So bleibt die Seite detailliert genug, ohne so zu tun, als wäre sie eine vollständige Befehlsreferenz.
LOCAL m AS LNMULTISET m = m.New m.Add 5 m.Add 5 PRINT m.Multiplicity 5 ' 2 m.Final