-
Notifications
You must be signed in to change notification settings - Fork 0
Start here
Here you can learn how to use B3 from scratch.
Before you do anything, you need to install a Webserver on your local machine. Please follow the link to find out different options.
Now you have a webserver installed on your local machine, you can go to the directory where the webserver serves up pages.
Let's call this directory HTMLROOT.
Also open a browser and point it to the URL and port your webserver is running on.
For example http://localhost. Let's call this URL, LOCAL_BASE_URL
- Navigate your webbrowser to your LOCAL_BASE_URL, and check that you see your webservers welcome page.
- Navigate to your HTMLROOT, and create the following directory.
hellobasic/
Now create an empty file called "index.html"
Open the file with Notepad or any other editor.
And add the following text.
<html>
Hello Basic
</html>
Now go again to your webbrowser, and change the url to LOCAL_BASE_URL/hellobasic
Your webbrowser should now show a page that only says "Hello Basic"
If you got that, then congratulations. You managed the hardest part of setting up your basic environment.
Once again, navigate to your HTMLROOT directory.
Create a new folder called "myfirstbasic"
Download the zip file, and copy the two files to your new folder ( HTMLROOT/myfirstbasic )
Also under it, create a file called index.html
Now your directory should have 3 files. index.html, basicloader.js and basicworker.js
Now open the file called index.html in your favorite editor.
If you do not know which one, just open it with notepad.
Now add the following text to make it look like this.
<html>
<head>
<script defer id="boot" type="module" src="basicloader.js"></script>
<script id="autorun.bas">
10 FOR T = 1 TO 10
20 PRINT "HELLO WORLD ";
30 NEXT
</script>
</head>
</html>
Now navigate your web browser to LOCAL_BASE_URL/myfirstbasic You should now see 10 times the words "Hello World".
Congratulations, now you have programmed your first program in B3.
From here, only the sky is the limit. If you are not sure where to go next, you can google basic listings, and try to copy them into the HTML and see what happens.