TStrArray1: Razlika med redakcijama

Iz SDMS
Jump to navigationJump to search
m
m
 
Vrstica 1: Vrstica 1:
{{Work}}
 
 
Razred '''TStrArray1''' je namenjen enodimenzionalni tabeli tekstovnih vrednosti.
 
Razred '''TStrArray1''' je namenjen enodimenzionalni tabeli tekstovnih vrednosti.
 +
 +
==Lastnosti==
 +
Razred se naredi s funkcijo {{EL|Rutine|CreateStrArray1}}.
 +
<source>Dim SA As TStrArray1
 +
SA = CreateStrArray1 (3)    // Alocira tabelo s tremi elementi
 +
SA.Items(0) = 'a'          // Nastavi prvi element
 +
SA.Items(1) = 'b'          // Nastavi drugi element
 +
SA.Items(2) = 'cde'        // Nastavi tretji element
 +
If SA.Items(1) = 'b' Then  // Uporabi vrednost drugega elementa
 +
  SA.Count = 2              // Spremeni velikost tabele
 +
EndIf
 +
Destroy (SA)                // Dealocira tabelo</source>
  
 
===Count===
 
===Count===
Lastnost '''Count''' .
+
Lastnost '''Count''' spremeni velikost tabele. Vrednosti v tabeli se ohranijo.
 
<declaration>
 
<declaration>
 
Property|TStrArray1.Count
 
Property|TStrArray1.Count
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|TStrArray1.Destroy
+
Property|TStrArray1.Items
 +
Index|Long|Indeks celice. Prvi element ima indeks 0.
 +
Result|String|Vrednost celice.
 
</declaration>
 
</declaration>
<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|TStrArray1.Items
+
Method|TStrArray1.Destroy
Index|Long|.
 
Result|String|.
 
 
</declaration>
 
</declaration>
<source></source>
 
  
 
[[Category:Razredi tabel|StrArr1]]
 
[[Category:Razredi tabel|StrArr1]]
 
[[Category:Razredi|StrArr1]]
 
[[Category:Razredi|StrArr1]]
 
[[Category:SDMS Basic|StrArr1]]
 
[[Category:SDMS Basic|StrArr1]]

Trenutna redakcija s časom 22:49, 29. december 2010

Razred TStrArray1 je namenjen enodimenzionalni tabeli tekstovnih vrednosti.

Lastnosti

Razred se naredi s funkcijo Rutine.CreateStrArray1.

Dim SA As TStrArray1
SA = CreateStrArray1 (3)    // Alocira tabelo s tremi elementi
SA.Items(0) = 'a'           // Nastavi prvi element
SA.Items(1) = 'b'           // Nastavi drugi element
SA.Items(2) = 'cde'         // Nastavi tretji element 
If SA.Items(1) = 'b' Then   // Uporabi vrednost drugega elementa
  SA.Count = 2              // Spremeni velikost tabele
EndIf
Destroy (SA)                // Dealocira tabelo

Count

Lastnost Count spremeni velikost tabele. Vrednosti v tabeli se ohranijo.

Property TStrArray1.Count As Long
ResultLongNova velikost tabele.

Items

Lastnost Items dostopa posamezni vrednosti v tabeli.

Property TStrArray1.Items (Index As Long) As String
IndexLongIndeks 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 TStrArray1.Destroy