Csound Csound-dev Csound-tekno Search About

[Csnd] Array index with negative index

Date2024-12-15 15:17
FromOeyvind Brandtsegg
Subject[Csnd] Array index with negative index
Hi

I was accidentally indexing an array with a negative index, I expected to get an error with out of range indices, but it just returns zero.
iArr[] fillarray 1,2,3,4
print iArr[-1]
Is it expected, or should I file an issue on it?

best
Øyvind
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here