Csound Csound-dev Csound-tekno Search About

[Csnd-dev] two dimensional arrays

Date2023-07-31 14:15
FromJohn ff
Subject[Csnd-dev] two dimensional arrays
What is the syntax to address a two d array>  I have

ginst[] init 3,8
...
if ginst[p1,p5] != 0 then
  turoff ginst[p1,51
  ginst[p1,51 nstance
endif

but the parser says

error: syntax error, unexpected ','  (token ",")
 from file bbb.csd (1), line 43:
 >>> if ginst[p1, <<<
Parsing failed due to invalid input!

Or is this only in an if?

==John ffitch

Date2023-07-31 16:14
FromHlöðver Sigurðsson
SubjectRe: [Csnd-dev] two dimensional arrays
I don't think the two dim array syntax is the issue here, could it be missing the closing bracket in
  turoff ginst[p1,51
?
Or was it a bad copy paste of the csound code?


On Mon, 31 Jul 2023 at 15:15, John ff <jpff@codemist.co.uk> wrote:
What is the syntax to address a two d array>  I have

ginst[] init 3,8
...
if ginst[p1,p5] != 0 then
  turoff ginst[p1,51
  ginst[p1,51 nstance
endif

but the parser says

error: syntax error, unexpected ','  (token ",")
 from file bbb.csd (1), line 43:
 >>> if ginst[p1, <<<
Parsing failed due to invalid input!

Or is this only in an if?

==John ffitch