Yes, that helps.  I want a sort of library, so I'll wrap rand_norm in a public class.  thanks!<br><br><div class="gmail_quote">On Sun, Aug 26, 2012 at 3:29 PM, Kassen <span dir="ltr"><<a href="mailto:signal.automatique@gmail.com" target="_blank">signal.automatique@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey George,<br>
<div class="im"><br>
> I add <a href="http://test.ck" target="_blank">test.ck</a> to the miniAudicle VM and the following error<br>
> error: line(3): undefined variable 'rand_norm'...<br>
><br>
> Am noob. plz help. kthx.<br>
<br>
</div>That is a simple one; the two files each have their own namespace.<br>
This means that stuff defined (and named) in one file can only be read<br>
or used from that file. If you put both functions in the same file it<br>
should work.<br>
<br>
Normally this is a good thing; this way we can use a name like "drum"<br>
in a file and not worry about whether we already used that name<br>
else-where so we don't get toms where we planned a snare.<br>
<br>
Functions and classes also have their own namespace, for the same<br>
reason. If this is not what you want or need you'll have to create a<br>
public class and make your function a member of that. Public classes<br>
can be accessed from anywhere in the VM.<br>
<br>
Hope that helps and gets you a bit further.<br>
<br>
Yours,<br>
Kas,<br>
_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</blockquote></div><br>