[chuck-users] Call functions from other files

JP Yepez jpyepezimc at gmail.com
Sat Aug 24 19:00:31 EDT 2019


Hi Claudio,

That sounds like a job for classes in ChucK. If you’re familiar with object oriented programming, you’ll find that it handles this type of scenarios pretty well. Depending on how you are setting up your project, you should be able to simply add the class to the virtual machine (+), or using Machine.add().

The following link should be helpful:

http://chuck.cs.princeton.edu/doc/language/class.html <http://chuck.cs.princeton.edu/doc/language/class.html>


Best,

JP


> On 25/08/2019, at 9:22 AM, Claudio Rogerio <claudioufpa at gmail.com> wrote:
> 
> Hello, 
> 
> I'd like to create some files with simple functions and call them in a Main.ck file.
> I try with Machine.add or spork, but these properties are a different way. 
> 
> There is any function as in C (#include ) or python (import file)?
> 
> Thanks Again,
> 
> -- 
> 
> Claudio Rogerio
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20190825/27d9f062/attachment.html>


More information about the chuck-users mailing list