The files to be compiled are entered into the project file but do they need to be module files or could they just be files with code in them?
Thanks
Richard
Project file
Re: Project file
Any file containing ZBasic code (subroutines, functions, data declarations, etc.) is considered to be a module. (And, by the way, you can't have ZBasic executable statements that are not contained within a subroutine or function.) The module containing the Main() subroutine is considered to be the main module and must be first on the list of files to compile.rich wrote:[...]could they just be files with code in them?
If need be, you can also include C and AVR assembly language files in the project file when compiling for a native mode target device. Generally speaking, those files should be named in the project file after all of the ZBasic code files. You could intermix the C and assembly language files with the ZBasic code files but there is no good reason to do so.
To summarize, the project file may consist of the following elements (generally speaking, in the order mentioned below):
- * optionally, compiler directives and compiler options
* ZBasic modules (of which the main module must be first)
* optionally, C and/or AVR assembly language files
- Don Kinzer
Actually, it is. For compatibility with Visual Basic, you can specify the keyword Module followed by the module name. However, since that module name must match the module name derived from the filename, it serves no useful purpose.rich wrote:I thought that "module" was a key word
That is correct. Section 2.3 of the ZBasic Reference Manual describes what modules are.rich wrote:it sounds like it is just a file with code in it and the first file in the list must have the sub main in it.
www.zbasic.net/doc/ZBasicRef.php?page=18
- Don Kinzer