This tutorial will teach you how to print out text in Basic4GL. Yes, it is the cliche Hello World Tutorial.
Running in a Window (optional)
Before you begin, you might want to set Basic4GL to run in a window. This will keep your monitor from having to change resolution every time you want to test a small change in your code. To make Basi4GL run in a window click on ''Basic4GL'' at the top of the window, select ''Options…'' and then uncheck ''fullscreen''.
print and printr
If you are familiar with other forms of BASIC, it may come as a surprise that Basic4GL has two forms of PRINT —- print and printr, both of which will be covered in this tutorial.
In other BASICs, print displays a line of text to the screen. The implementation in Basic4GL is a bit different, so we'll start with printr, which acts like the print BASIC programmers know.
Say Hello (printr)
To display a line of text, just use printr like this :
printr "Hello world."
Like the common BASIC print, printr will cause a line break, which will cause thing printed to appear on the next line down.
printr "The computer says : "
printr "Hello World"
This appears on two different lines, as BASIC programmers would expect.
Say Hello (print)
print on the other hand, does not cause a line break.
printr "The computer says : "
printr "Hello World"
This will all be printed on one line.
Conclusion
You have now completed the cliche programming tutorial "Hello World" for Basic4GL and gained some insight on the differences between printr and print.
This page has been recommended for cleanup, integration, etc.