diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-21 21:27:03 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-21 21:27:03 +0200 |
| commit | 5cc2947143f2a6ebd4ef1ae4d25ab956b87de808 (patch) | |
| tree | 0d4489b298da3be04ed4bce117f616468146a0f8 /testsuite/runnable/slice_pointer.elna | |
| parent | 44d6e8a27294e5ca7300ab11900011b73d9336d4 (diff) | |
| download | elna-5cc2947143f2a6ebd4ef1ae4d25ab956b87de808.tar.gz | |
Diffstat (limited to 'testsuite/runnable/slice_pointer.elna')
| -rw-r--r-- | testsuite/runnable/slice_pointer.elna | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/runnable/slice_pointer.elna b/testsuite/runnable/slice_pointer.elna new file mode 100644 index 0000000..d053f51 --- /dev/null +++ b/testsuite/runnable/slice_pointer.elna @@ -0,0 +1,11 @@ +var + array: [3]Int := [3]Int{ 2, 4, 6 } + slice: []Int + +begin + slice := array.ptr[1 to 3]; + + assert(slice.length = 3u); + assert(slice[1] = 2); + assert(slice[3] = 6) +end. |
