Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Arrays/Clipper/arrays-1.clipper
Normal file
11
Task/Arrays/Clipper/arrays-1.clipper
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Declare and initialize two-dimensional array
|
||||
Local arr1 := { { "NITEM","N",10,0 }, { "CONTENT","C",60,0} }
|
||||
// Create an empty array
|
||||
Local arr2 := {}
|
||||
// Declare three-dimensional array
|
||||
Local arr3[2,100,3]
|
||||
// Create an array
|
||||
Local arr4 := Array(50)
|
||||
|
||||
// Array can be dynamically resized:
|
||||
arr4 := ASize( arr4, 80 )
|
||||
6
Task/Arrays/Clipper/arrays-2.clipper
Normal file
6
Task/Arrays/Clipper/arrays-2.clipper
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// Adding new item to array, its size is incremented
|
||||
Aadd( arr1, { "LBASE","L",1,0 } )
|
||||
// Delete the first item of arr3, The size of arr3 remains the same, all items are shifted to one position, the last item is replaced by Nil:
|
||||
ADel( arr1, 1 )
|
||||
// Assigning a value to array item
|
||||
arr3[1,1,1] := 11.4
|
||||
2
Task/Arrays/Clipper/arrays-3.clipper
Normal file
2
Task/Arrays/Clipper/arrays-3.clipper
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
x := arr3[1,10,2]
|
||||
// The retrieved item can be nested array, in this case it isn't copied, the pointer to it is assigned
|
||||
7
Task/Arrays/Clipper/arrays-4.clipper
Normal file
7
Task/Arrays/Clipper/arrays-4.clipper
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// Fill the 20 items of array with 0, starting from 5-th item:
|
||||
AFill( arr4, 0, 5, 20 )
|
||||
//Copy 10 items from arr4 to arr3[2], starting from the first position:
|
||||
ACopy( arr4, arr3[2], 1, 10 )
|
||||
//Duplicate the whole or nested array:
|
||||
arr5 := AClone( arr1 )
|
||||
arr6 := AClone( arr1[3] )
|
||||
Loading…
Add table
Add a link
Reference in a new issue