Re: [Csnd-dev] instr0 non-globals affecting variable assignment in instruments

vlz <[email protected]> Mon, 8 Dec 2025 08:22:54 +0000
Newsgroups gmane.comp.audio.csound.devel
Message-ID <[email protected]>
The code should work, could you open an issue and we'll take a look. The oth=
er issue should be fixed once we merge the PR.

best
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 7 Dec 2025, at 23:54, Richard Knight <[email protected]> wrote:
>=20
> =EF=BB=BFI'm moving to Csound 7 and some of my collection of UDOs don't wo=
rk - there are some patterns such as the one below in some files, which caus=
ed compilation to fail with the following error:
>=20
> error: Array variable name 'Sresult' used before as a different type at li=
ne 14
> SEMERR: Array variable name 'Sresult' used before as a different type at l=
ine 14
>=20
> I can see why this is happening (conflicting types of Sresult) and how to w=
ork around, but is this expected behaviour?
> Notably this seems to only occur only in opcodes and if arrays are involve=
d - if I move the contents of the opcode into an instr then it works OK, and=
 numeric/string primitives work OK in this pattern.
>=20
>=20
> Sresult =3D "anything"
>=20
> opcode test1, S[], 0
>        Sresult[] fillarray "t1", "t2"
>        xout Sresult
> endop
>=20
> instr 1
>        Sresult[] test1
> endin