Csound Csound-dev Csound-tekno Search About

[Cs-dev] csound 6: how to specify an array in an udo?

Date2013-03-09 19:59
Fromjoachim heintz
Subject[Cs-dev] csound 6: how to specify an array in an udo?
this does not work:

   opcode StrToAscI, i[], S
Sin        xin
ilen       strlen     Sin
iArr[]     init       ilen
ipos       =          0
loop:
ichr       strchar    Sin, ipos
iArr[ipos] =          ichr
            loop_lt    ipos, 1, ilen, loop
            xout       iArr[]
   endop

error: syntax error, unexpected '[', expecting ','  (token "[") line 16:
 >>>  opcode StrToAscI, i[ <<<

thanks -
	joachim

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-03-12 12:14
FromSteven Yi
SubjectRe: [Cs-dev] csound 6: how to specify an array in an udo?
Hi Joachim,

This is not implemented yet.  I'm not sure how the syntax should be;
internally we have:

[k;

to denote a k[].  This matches the character at a time denoting of
types that was in csound previously.  I suppose, that can be changed
to i[] or i[][], but that changes how types are looked up a bit.

steven

On Sat, Mar 9, 2013 at 7:59 PM, joachim heintz  wrote:
> this does not work:
>
>    opcode StrToAscI, i[], S
> Sin        xin
> ilen       strlen     Sin
> iArr[]     init       ilen
> ipos       =          0
> loop:
> ichr       strchar    Sin, ipos
> iArr[ipos] =          ichr
>             loop_lt    ipos, 1, ilen, loop
>             xout       iArr[]
>    endop
>
> error: syntax error, unexpected '[', expecting ','  (token "[") line 16:
>  >>>  opcode StrToAscI, i[ <<<
>
> thanks -
>         joachim
>
> ------------------------------------------------------------------------------
> Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
> Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
> endpoint security space. For insight on selecting the right partner to
> tackle endpoint security challenges, access the full report.
> http://p.sf.net/sfu/symantec-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net