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.2 released

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

Craft Basic version 1.2 released

Post by admin »

I had to rush this one out to fix a critical, but uncommon bug with for/next loops.

New example:

Code: Select all

'euler method example

precision 4

let s = 2
gosub euler

let s = 5
gosub euler

let s = 10
gosub euler

end

sub euler

	cls
	cursor 1, 1
	wait
	print "step: ", s

	let b = 100
	let y = 100

	for t = 0 to b step s

		print t, " : ", y

		let y = y + s * (-0.07 * (y - 20))

		gosub delay

	next t

	alert "step ", s, " finished"

return

sub delay

	let w = clock

	do

		wait

	loop clock < w + 200

return
Post Reply