Import Question

BlitzMax Forums/BlitzMax Beginners Area/Import Question

From what I understand, if you use include the code in question is inserted "inline" in your program, before it is compiled and yes it will potentially be duplicated. However it will not slow down your programs execution speed, as you'll get a "Duplicate identifier" (or something along those lines) compiler error if you manage to screw up.

In contrast import tells the compiler to generate symbols to another object file, instead of embedding it.

This means that if two different files both import "myLib.bmx" they will be linked against the same object file, where as two different files, both including "myLib.bmx" will have the myLib.bmx file embedded into their source code (and thus respective object files) and may give you dupelicate identifer errors.

Probably not very clear -- it's kinda late.