Information Technology - Computer Programming - Source Code - Homebrew - Open Source - Software - Hardware - 8 bit - 16 bit - 32 bit - 64 bit - x86 - x64 - DOS - Windows - Linux - Arduino - Embedded - Development - Retro - Vintage - Math - Science - History - Hobby - Beginners - Professionals - Experiment - Research - Study - Fun - Games

Craft Basic version 1.7 released

Updates about our products and services.
Post Reply
admin
Site Admin
Posts: 118
Joined: Wed Feb 22, 2023 6:51 am

Craft Basic version 1.7 released

Post by admin »

​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!
Post Reply