TNumArray1
Iz SDMS
Razred TNumArray1 je namenjen enodimenzionalni tabeli numeričnih vrednosti.
Lastnosti
Razred se naredi s funkcijo Rutine.CreateNumArray1.
Dim NA As TNumArray1
NA = CreateNumArray1 (3) // Alocira tabelo s tremi elementi
NA.Items(0) = 12 // Nastavi prvi element
NA.Items(1) = 5 // Nastavi drugi element
NA.Items(2) = 55.5 // Nastavi tretji element
NA.Sort // Uredi elemente po vrednosti
If NA.Items(1) = 12 Then // Uporabi vrednost drugega elementa
NA.Count = 2 // Spremeni velikost tabele
EndIf
Destroy (NA) // Dealocira tabeloCount
Lastnost Count spremeni velikost tabele. Vrednosti v tabeli se ohranijo.
| Property TNumArray1.Count As Long | ||
| Result | Long | Nova velikost tabele. |
Items
Lastnost Items dostopa posamezni vrednosti v tabeli.
| Property TNumArray1.Items (Index As Long) As Float | ||
| Index | Long | Indeks celice. Prvi element ima indeks 0. |
| Result | Float | Vrednost celice. |
Sort
Metoda Sort uredi celice po vrsti.
| Method TNumArray1.Sort |
| Nesortirano | Sortirano |
|---|---|
| 1 | 1 |
| 5 | 3 |
| 3 | 5 |
Opuščeno
Destroy
Metoda Destroy dealocira razred. Metoda je opuščena in se priporoča uporaba funkcije Rutine.Destroy.
| Method TNumArray1.Destroy |