Forums
multiple files
2 posts
• Page 1 of 1
multiple files
What is the easiest way to have multiple .cobra files that "know" about each other? I can get a cobra dll to be imported into cobra (to use python terminology) but the "use" syntax seems to not even look for .cobra files.
Eat a live toad the first thing in the morning and nothing worse will happen to you the rest of the day.
- mindstormss
- Posts: 8
Re: multiple files
Run them together like so:
This is different than Python where you just start with one file and it imports the others.
Also, if you get a long list of files, you can list them one per line in a separate file and do this:
With either technique, you can add a -c to only compile them, afterwhich you'll have a .exe that you can run and distribute independently:
- Code: Select all
cobra MyProgram.cobra Shape.cobra Circle.cobra Square.cobra
This is different than Python where you just start with one file and it imports the others.
Also, if you get a long list of files, you can list them one per line in a separate file and do this:
- Code: Select all
cobra -files-to-compile:MyFileList.text
With either technique, you can add a -c to only compile them, afterwhich you'll have a .exe that you can run and distribute independently:
- Code: Select all
cobra MyProgram.cobra Shape.cobra Circle.cobra Square.cobra
MyProgram
- Charles
- Posts: 2515
- Location: Los Angeles, CA
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 43 guests