Bruno Ruviaro edited Nesting.tex  almost 10 years ago

Commit id: d9c71ec9c604dd9cd0a70928df53e05c03ff6f76

deletions | additions      

       

\textit{To ``read" this style of code you start from the innermost nested message and move out to each successive layer. Here is an example aligned to show how the innermost message is nested inside the outer messages.}  \end{quotation}  \begin{lstlisting}  exprand(1.0, 1000.0);  dup({exprand(1.0, 1000.0)}, 100);  sort(dup({exprand(1.0, 1000.0)}, 100));  round(sort(dup({exprand(1.0, 1000.0)}, 100)), 0.01);  \end{lstlisting}  \lstinputlisting[style=SuperCollider-IDE, basicstyle=\scttfamily\footnotesize]{code-nesting.scd}  The code below is an example of nesting. Answer the questions that follow. You don't have to explain what the numbers are doing---the task is simply to identify the arguments in each layer of nesting. (Example and exercise questions also borrowed and slightly adapted from Cottle's tutorial.)