Thursday, May 27, 2010

Basic4GL Basics Tutorial 1 - Displaying Text to the Screen

This tutorial assumes you have downloaded Basic4GL from here and installed it.

Basic4GL is a easy to learn easy to use programming language. It isn't designed to be the best programming language in fact it was a hobby project by a guy named Tom Mulgrew. However he has just recently had a child and well all his spare time is taken with work and his family.

This tutorial is one of a few that teaches you the basics of Basic4GL programming. Also note there are the guides that tells you about Basic4GL. However this tutorial set only covers key aspects of Basic4GL so you may have to read the guides to help you learn other aspects of Basic4GL. If you have problems learning parts of Basic4GL email me your problems at wayne_312@live.com or go and ask for help at the Basic4GL forum located here.

Ok open up the Basic4GL IDE which looks like the image below



Well done. Ok now we should learn how to display text on the screen. There are two main ways in Basic4GL. There is the printr function which returns the cursor to the next line. The print function leaves the cursor after the last character of the string. Now lets have a go.

printr "Hello World!"

did you see the go button located in the middle of the top bar. Click on it I dare you to. Also if you like use the shortcut which is F9.

Now lets go complex.

print "Health "
printr "= 100"
print "Score"
printr "= 0"

Run that and you will see some text in the screen.

Well this concludes the first tutorial on displaying text to the screen. The next tutorial should be out soon. 

No comments:

Post a Comment