Forums

multiple files

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

multiple files

Postby mindstormss » Sun Oct 26, 2008 1:01 pm

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

Postby Charles » Sun Oct 26, 2008 2:35 pm

Run them together like so:
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


Return to Discussion

Who is online

Users browsing this forum: No registered users and 1 guest