[chuck-users] imports/includes

Curtis Ullerich curtullerich at gmail.com
Sat Aug 8 13:56:28 EDT 2020


What's the state of the art for imports/includes?

If I have files lib0.ck and lib1.ck that declare public classes both used
in control.ck, I understand these to be the two options for running them:

chuck lib0.ck lib1.ck control.ck

or, make another file control-main.ck:
Machine.add("lib0.ck");
Machine.add("lib1.ck");
Machine.add("control.ck");

and run it as:
chuck control-main.ck

I thought it would work to use Machine.add("lib0.ck"); Machine.add("lib1.ck
"); as the first line of control.ck and then just run chuck control.ck, but
the included classes are not found.

Are these the two options, or is there another way that can support
transitive inclusion (not having to list each util file for every program
that uses them)?

Thanks,
Curtis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20200808/b88dfd6a/attachment.html>


More information about the chuck-users mailing list