Compiling with evaluation license

Questions and discussion about the ZBasic IDE.
Post Reply
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Compiling with evaluation license

Post by rich »

So i am taking ZBasic for a ride.
I downloaded and installed the IDE.
I got the temp native mode license.
Copied some code form the LCD app note.

Now when i open Tools" pull down the "Compile", "Build", and "Go" are grayed out.

Why can i not compile with the temp license?

BTW it is Win7.

Richard
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Post by rich »

So i fixed it.
I needed to add the files to a project and then i could compile.

However will not compile because it can not find a 'module'.

So does that mean all code needs a top module?
Or does each code file need to be a module?

Thank for any answer.
cheers,
Richard
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: Compiling with evaluation license

Post by dkinzer »

rich wrote:Now when i open Tools" pull down the "Compile", "Build", and "Go" are grayed out.
As you've discovered, you must have or create a project in order to use those menu entries.

The .zip file that I posted on your earlier thread contained a complete buildable/executable project. The simplest course to take would be to use the Open entry on the Project menu and select the mul32x32_test.pjt project. Then press the F7 key to compile the project.

Every project must have exactly one module that contains a subroutine named Main(). In the test project that I posted it is contained in the file mul32x32_test.bas. That module is essentially a simple test driver for the underlying routines. As I indicated, it contains conditionals that allow you to compile it to multiply two values and either output the result or to estimate the execution time.

It is important to note that an evaluation license is only necessary in order to compile for a generic target, e.g. mega1284P. If you compile for a ZX target such as the ZX-24s the generic target license is superfluous - you can just use the free compiler for those targets.
rich wrote:Or does each code file need to be a module?
Every .bas file is a module. However, that distinction is mostly unimportant except that each module name must be unique for a given project and that the module name can be used for resolving name conflicts.
- Don Kinzer
rich
Posts: 81
Joined: 19 November 2015, 12:23 PM

Post by rich »

That is good stuff.
Thanks much.

Another question,
do key words have to start with capital letters.
I notice they are in all the examples.

Thanks again.
Richard

Oh, do parameter that can be placed in the option pull down dialog have the same syntax as the options in the language manual.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

rich wrote:do key words have to start with capital letters. I notice they are in all the examples.
No, that's just a stylistic choice. ZBasic is not case sensitive for either keywords or variable/procedure names. Obviously, that can lead to some ambiguity issues when invoking C and assembly language routines but it usually does not cause any problems (and there is a way to work around that if it arises).
rich wrote:do parameter that can be placed in the option pull down dialog have the same syntax as the options in the language manual.
Specifically, which dialog are you referring to? I suspect that it might be the Options|Target Options dialog. If so, you don't actually enter options directly there. Rather, you make choices on the left side of the dialog and then click the Apply button at which time the Configuration Parameters box will be populated with options reflecting those choices. Then, you can copy those configuration parameters to the clipboard and paste them into either your .pjt file (if you chose the --device-parameter form) or near the top of the main module, i.e. the one containing the Main() subroutine (if you chose the Option DeviceParameter form).
- Don Kinzer
Post Reply