TStrArray2: Razlika med redakcijama

Iz SDMS
Jump to navigationJump to search
m
m
Vrstica 1: Vrstica 1:
{{Work}}
 
 
Razred '''TStrArray2''' je namenjen dvodimenzionalni tabeli tekstovnih vrednosti.
 
Razred '''TStrArray2''' je namenjen dvodimenzionalni tabeli tekstovnih vrednosti.
 +
 +
==Lastnosti==
 +
Razred se naredi s funkcijo {{EL|Rutine|CreateStrArray2}}.
 +
<source>Dim SA As TStrArray2
 +
SA = CreateStrArray2 (3, 2) // Alocira tabelo s 3x2 elementi
 +
SA.Items(0,0) = 1          // Nastavi element 
 +
SA.Items(1,0) = 3          // Nastavi element
 +
SA.Items(2,0) = 2          // Nastavi element
 +
SA.Items(2,1) = 1          // Nastavi element
 +
If SA.Items(1,0) = 3 Then  // Uporabi vrednost elementa
 +
  SA.Count1 = 2            // Spremeni velikost tabele v 2x2
 +
  SA.Count2 = 3            // Spremeni velikost tabele v 2x3
 +
EndIf
 +
Destroy (SA)                // Dealocira tabelo</source>
  
 
===Count1===
 
===Count1===
Lastnost '''Count1''' .
+
Lastnost '''Count1''' spremeni velikost prve dimenzije tabele. Vrednosti v tabeli se ohranijo.
 
<declaration>
 
<declaration>
 
Property|TStrArray2.Count1
 
Property|TStrArray2.Count1
Result|Long|.
+
Result|Long|Nova velikost tabele.
 
</declaration>
 
</declaration>
<source></source>
 
  
 
===Count2===
 
===Count2===
Lastnost '''Count2''' .
+
Lastnost '''Count2''' spremeni velikost druge dimenzije tabele. Vrednosti v tabeli se ohranijo.
 
<declaration>
 
<declaration>
 
Property|TStrArray2.Count2
 
Property|TStrArray2.Count2
Result|Long|.
+
Result|Long|Nova velikost tabele.
 
</declaration>
 
</declaration>
<source></source>
 
  
===Destroy===
+
===Items===
Metoda '''Destroy''' .
+
Lastnost '''Items''' dostopa posamezni vrednosti v tabeli.
 
<declaration>
 
<declaration>
Method|TStrArray2.Destroy
+
Property|TStrArray2.Items
 +
Index1|Long|Prvi indeks celice. Prvi element ima indeks 0.
 +
Index2|Long|Drugi indeks celice. Prvi element ima indeks 0.
 +
Result|String|Vrednost celice.
 
</declaration>
 
</declaration>
 
<source></source>
 
<source></source>
  
===Items===
+
==Opuščeno==
Lastnost '''Items''' .
+
 
 +
===Destroy===
 +
Metoda '''Destroy''' dealocira razred. Metoda je opuščena in se priporoča uporaba funkcije {{EL|Rutine|Destroy}}.
 
<declaration>
 
<declaration>
Property|TStrArray2.Items
+
Method|TStrArray2.Destroy
Index1|Long|.
 
Index2|Long|.
 
Result|String|.
 
 
</declaration>
 
</declaration>
<source></source>
 
  
 
[[Category:Razredi tabel|StrArr2]]
 
[[Category:Razredi tabel|StrArr2]]
 
[[Category:Razredi|StrArr2]]
 
[[Category:Razredi|StrArr2]]
 
[[Category:SDMS Basic|StrArr2]]
 
[[Category:SDMS Basic|StrArr2]]

Redakcija: 00:28, 22. januar 2011

Razred TStrArray2 je namenjen dvodimenzionalni tabeli tekstovnih vrednosti.

Lastnosti

Razred se naredi s funkcijo Rutine.CreateStrArray2.

Dim SA As TStrArray2
SA = CreateStrArray2 (3, 2) // Alocira tabelo s 3x2 elementi
SA.Items(0,0) = 1           // Nastavi element   
SA.Items(1,0) = 3           // Nastavi element
SA.Items(2,0) = 2           // Nastavi element 
SA.Items(2,1) = 1           // Nastavi element 
If SA.Items(1,0) = 3 Then   // Uporabi vrednost elementa
  SA.Count1 = 2             // Spremeni velikost tabele v 2x2
  SA.Count2 = 3             // Spremeni velikost tabele v 2x3
EndIf
Destroy (SA)                // Dealocira tabelo

Count1

Lastnost Count1 spremeni velikost prve dimenzije tabele. Vrednosti v tabeli se ohranijo.

Property TStrArray2.Count1 As Long
ResultLongNova velikost tabele.

Count2

Lastnost Count2 spremeni velikost druge dimenzije tabele. Vrednosti v tabeli se ohranijo.

Property TStrArray2.Count2 As Long
ResultLongNova velikost tabele.

Items

Lastnost Items dostopa posamezni vrednosti v tabeli.

Property TStrArray2.Items (Index1, Index2 As Long) As String
Index1LongPrvi indeks celice. Prvi element ima indeks 0.
Index2LongDrugi indeks celice. Prvi element ima indeks 0.
ResultStringVrednost celice.

Opuščeno

Destroy

Metoda Destroy dealocira razred. Metoda je opuščena in se priporoča uporaba funkcije Rutine.Destroy.

Method TStrArray2.Destroy