NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages

The #import directive lets you define a global byte array variable in your NXC program that contains the contents of the imported file.

Like #include, this directive is followed by a filename enclosed in double quote characters. Following the filename you may optionally include a format string for constructing the name of the variable you want to define using this directive.

#import "myfile.txt" data

By default, the format string is s which means that the name of the file without any file extension will be the name of the variable. For instance, if the format string "data" were not specified in the example above, then the name of the byte array variable would be "myfile". In this case the name of the byte array variable will be "data".

The #import directive is often used in conjunction with the GraphicArrayOut and GraphicArrayOutEx API functions.