Project file
Posted: 26 November 2018, 9:28 AM
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
Thanks
Richard
A place to discuss ZBasic and ZX series microcontrollers.
https://forum.zbasic.net/
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?
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.