Just BASIC
From Wikipedia, the free encyclopedia
Just BASIC is a dialect of the highly popular BASIC programming language of the 1970's for 32-bit Windows computer systems. It's the freeware version of Liberty BASIC, popular since 1992. It allows you to create programs with a comprehensive tutorial, help files and a message board.
Contents |
[edit] Syntax
As the title suggests and most BASIC dialects are, the syntax is very simple and easy-to-learn. Programmers have found it is extremely effective in creating programs and even games because of this. Below is a list of some simple commands:
- print - Outputs text to the screen, as in:
print "Hello, world!"
- GOTO - Instructs the computer to jump to another point in the computer program, specified by a label, as in:
goto [start]
orgoto 10
- let - Allows the programmer to make one variable equal to another or do mathematical calculations, normally used to make code easier to read (as in the if/then example below). Note: It is not required to use the 'let' command before changing a variable:
let h$ = "hello"
is the same ash$ = "hello"
- input - allows the user to define a variable, as in:
input "What is your name?"; name$
- if/then - allows the programer to make the program check a variable, and take certain actions depending on its value (or content if it's a string), as in:
if n < 1 then let n = 1
- Here is the "Hello World" program in Just BASIC:
Print "Hello World"
end
Like most BASIC languages, JustBasic uses the standard if(example=example) 'do something endif
syntax, instead of the more Java like { and }. Also note the use of only one equals sign, in contrast with the C-style "==" equality operator in many languages.
[edit] The GUI interface
Just BASIC also allows for the construction of GUI interfaces. It also comes with Freeform-J a WYSIWYG editor for just this purpose. FreeForm-J is the sister of Liberty BASIC's original FreeForm, which is now a community open-source project.
[edit] Compiling
Just BASIC automatically compiles the active program on running. To distribute a program, the programmer must tokenize a program, which compiles the active program into bytecode. The tokenized file is executed by the included runtime engine, which is named jbrun101.exe in the current v1.01 release.
Please note that the tokenized files created in JustBASIC are not in byte code. They are actually your entire source code, shorthanded and separately encoded depending on the functions and features. The JustBASIC runtime engine reads this file and executes the commands as if a user was entering them. In short, JustBASIC is interpretor not a compiler.
[edit] Difference between Liberty BASIC and Just BASIC
Here are some differences between Just BASIC and Liberty BASIC:
- Liberty BASIC supports API calls
- Liberty BASIC has custom dialogs for fonts, colors, and the printer
- Liberty BASIC has a POPUPMENU that implements a right-click menu
- Liberty BASIC has an internal SORT command
- Liberty BASIC costs $49.95 for the gold version, or $29.99 for the silver version, which doesn't allow you to compile a program.
- Liberty BASIC's IDE has a "quick jump" feature that lets you quickly jump to a label or function
- Liberty BASIC supports an add-on toolset called Assist (http://www.libertybasic.com/assist.html), which includes extra tools such as project management, profiling, source code versioning, colored source diffing, and more. This add-on is $49.95.
However, many enhancements to Just BASIC can be done by VBScript. The code for these enhancements can be found at the Just BASIC forum (see below for link).
The download size is about 2.5MB.
[edit] External links
- http://www.justbasic.com/ - Official website
- http://justbasic.conforums.com/ - Online forum