Just BASIC
Encyclopedia
Just BASIC is a dialect of the highly popular programming language
BASIC
of the 1970s, for 32-bit computer systems using Windows
. It's the freeware
version of Liberty BASIC
, popular since 1992. Just BASIC development began in 2001; first public release was in 2004. It allows creating programs with a comprehensive tutorial
, help files and a message board.
dialects are, the syntax
is very simple and easy-to-learn. This makes it very effective in creating programs and even games. Below is a list of some simple commands
:
Like most BASIC languages, Just BASIC uses the standard
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.
Hello, world!
Graphical user interfaces
Interpreting
Just BASIC automatically interprets the active program on running. To distribute a program, the source code of a program must be tokenized
. The source code is shorthanded and separately encoded depending on its various functions and features. The tokenized file is executed by the included runtime engine, named jbrun101.exe in the v1.01 release. The runtime engine reads this file and executes the commands as if a user was entering them.
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
BASIC
BASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....
of the 1970s, for 32-bit computer systems using Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
. It's the freeware
Freeware
Freeware is computer software that is available for use at no cost or for an optional fee, but usually with one or more restricted usage rights. Freeware is in contrast to commercial software, which is typically sold for profit, but might be distributed for a business or commercial purpose in the...
version of Liberty BASIC
Liberty BASIC
Liberty BASIC is a commercial computer programming language and integrated development environment . It has an interpreter developed in Smalltalk, which recognizes its own dialect of the BASIC programming language...
, popular since 1992. Just BASIC development began in 2001; first public release was in 2004. It allows creating programs with a comprehensive tutorial
Tutorial
A tutorial is one method of transferring knowledge and may be used as a part of a learning process. More interactive and specific than a book or a lecture; a tutorial seeks to teach by example and supply the information to complete a certain task....
, help files and a message board.
Syntax
As the name suggests, and most BASICBASIC
BASIC is a family of general-purpose, high-level programming languages whose design philosophy emphasizes ease of use - the name is an acronym from Beginner's All-purpose Symbolic Instruction Code....
dialects are, the syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....
is very simple and easy-to-learn. This makes it very effective in creating programs and even games. Below is a list of some simple commands
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....
:
- printInput/outputIn computing, input/output, or I/O, refers to the communication between an information processing system , and the outside world, possibly a human, or another information processing system. Inputs are the signals or data received by the system, and outputs are the signals or data sent from it...
- outputs textWritingWriting is the representation of language in a textual medium through the use of a set of signs or symbols . It is distinguished from illustration, such as cave drawing and painting, and non-symbolic preservation of language via non-textual media, such as magnetic tape audio.Writing most likely...
to the screen, as in:print "Hello, world!"
- gotoGotogoto is a statement found in many computer programming languages. It is a combination of the English words go and to. It performs a one-way transfer of control to another line of code; in contrast a function call normally returns control...
- tells the computerComputerA computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...
to jump to another point in the computer programComputer programA computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...
, specified by a labelLabel (programming language)A label in a programming language is a sequence of characters that identifies a location within source code. In most languages labels take the form of an identifier, often followed by a punctuation character . In many high level programming languages the purpose of a label is to act as the...
, as in:goto [start]
orgoto 10
- let - allows making one variableVariable (programming)In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...
equal to another or do mathematicsMathematicsMathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...
calculationCalculationA calculation is a deliberate process for transforming one or more inputs into one or more results, with variable change.The term is used in a variety of senses, from the very definite arithmetical calculation of using an algorithm to the vague heuristics of calculating a strategy in a competition...
s, 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 defining a variable, as in:
input "What is your name?"; name$
- if/then - allows making 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
Like most BASIC languages, Just BASIC uses the standard
if(example=example)
'do something
end if
syntax, instead of the more Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
-like { and }. Also note the use of only one equals sign, in contrast with the C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
-style "
" equality operator in many languages.
Hello, world!
The minimal code required for the "Hello, world!" programHello world programA "Hello world" program is a computer program that outputs "Hello world" on a display device. Because it is typically one of the simplest programs possible in most programming languages, it is by tradition often used to illustrate to beginners the most basic syntax of a programming language, or to...
in Just BASIC is:
Print "Hello, world!"
end
Graphical user interfacesPrint "Hello, world!"
end
Just BASIC also allows building graphical user interfaceGraphical user interfaceIn computing, a graphical user interface is a type of user interface that allows users to interact with electronic devices with images rather than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and...
s (GUIs). It also comes with Freeform-J a WYSIWYGWYSIWYGWYSIWYG is an acronym for What You See Is What You Get. The term is used in computing to describe a system in which content displayed onscreen during editing appears in a form closely corresponding to its appearance when printed or displayed as a finished product...
editor for just this purpose. FreeForm-J is the sister of Liberty BASICLiberty BASICLiberty BASIC is a commercial computer programming language and integrated development environment . It has an interpreter developed in Smalltalk, which recognizes its own dialect of the BASIC programming language...
's original FreeForm, which is now a community open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
project.
InterpretingJust BASIC automatically interprets the active program on running. To distribute a program, the source code of a program must be tokenized
Lexical analysis
In computer science, lexical analysis is the process of converting a sequence of characters into a sequence of tokens. A program or function which performs lexical analysis is called a lexical analyzer, lexer or scanner...
. The source code is shorthanded and separately encoded depending on its various functions and features. The tokenized file is executed by the included runtime engine, named jbrun101.exe in the v1.01 release. The runtime engine reads this file and executes the commands as if a user was entering them.