Craft Basic version 1.7 released


I wasn't planning on updating just yet, but I found some issues that needed fixing.

The PRIME() function was returning 1 on true. It will now return -1 on true. This way it is compatible with NOT(). For example, NOT(PRIME(24)) evaluates to -1.

The ROUND() function wasn't working at all due to a few  typos.  Now fixed.

I decided to overload the square root function, It may now be written as SQR() or SQRT(). I wanted it to be just SQRT(), but after some thought I decided  it would be good to include the traditional BASIC SQR() spelling.

I found a major issue with the FOR loop structure again. It was a silly parsing issue where I was not accounting for the spaces around TO and STEP. I think it's all good now. Did a lot of testing. For example, the following code was not executing correctly before this fix. Now you may have variable names with the words to and for in the name as things should be. It was just an issue with the FOR loops.

Example:

define tostep = 1, stepto = 10, steps, stepp = 2

for steps = tostep to stepto step stepp

    print steps

next steps

Version 1.7 also comes with 10 new examples. This makes 100 total!

Files

craftbasic.zip 266 kB
Sep 06, 2023

Get Craft Basic

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.