From 263dbab626e6a99f7959a4c1716f0496906ee638 Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Wed, 30 Aug 2023 08:24:54 +0200 Subject: Some simplifications. Added i_ndebug macro flag to disable assertions in cspan. --- misc/examples/spans/multidim.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'misc') diff --git a/misc/examples/spans/multidim.c b/misc/examples/spans/multidim.c index ebc05a70..70fda7e2 100644 --- a/misc/examples/spans/multidim.c +++ b/misc/examples/spans/multidim.c @@ -66,6 +66,10 @@ int main(void) puts("\nOriginal ms3 span with updated data:"); print3d(ms3); + + puts("col = ms3[1, :, 2]"); + ispan col = cspan_slice(ispan, &ms3, {1}, {c_ALL}, {2}); + c_foreach (i, ispan, col) printf(" %d", *i.ref); puts(""); cstack_int_drop(&v); -- cgit v1.2.3