TT BASICSTUDIO

… downloads

THE LANGUAGE / VERSION 0.12

Small words.
Big ideas.

All 73 reserved words, with explanation and a syntax fragment. You cannot use these words as your own variable name. Capital letters make no difference.

73 keywords

ADDHANDLER

Events

Connects an event to a procedure with appropriate parameters.

AddHandler button.Click, AddressOf OnClick

ADDRESSOF

Events

Refers to an event handler procedure.

AddHandler button.Click, AddressOf OnClick

AND

Operators

Logical AND; both conditions must be true.

If ready And enabled Then

ARRAY

Declarations & types

Creates a Variant array from the specified values; also useful for type checking.

Dim values As Variant = Array(1, 2, 3)

AS

Declarations & types

Indicates a type in a declaration or signature.

Dim name As String

BOOLEAN

Declarations & types

Logical value: True or False.

Dim ready As Boolean = True

CALL

Declarations & types

Calls a procedure or method.

Call Greet()

CASE

Program flow

Defines a choice within Select Case. Case Else is the alternative.

Case 1

CATCH

Error handling

Catches an error; an optional String variable receives the message.

Catch message As String

CLASS

Objects

Defines a class with fields and methods.

Class Counter

COLLECTION

Declarations & types

Collection of object references.

Dim items As New Collection

CONTINUE

Program flow

Continues with the next iteration of the indicated loop.

Continue For

DIM

Declarations & types

Declares a variable, object reference, or array.

Dim count As Integer = 0

DO

Program flow

Starts a loop, possibly with While or Until.

Do While running

DOUBLE

Declarations & types

Numeric type for decimal numbers and scientific notation.

Dim value As Double = 1.2E3

EACH

Program flow

Cycles through the elements of a container together with For.

For Each item In items

ELSE

Program flow

Executes the alternative if previous conditions are false.

Else

ELSEIF

Program flow

Test a subsequent condition within a If block.

ElseIf score = 10 Then

END

Program flow

Ends the program or closes a block with a second keyword.

End If

EXIT

Program flow

Exit the indicated loop or procedure.

Exit For

FALSE

Operators

The logical value false.

ready = False

FOR

Program flow

Begins a counting loop or For Each loop.

For i = 1 To 10

FUNCTION

Declarations & types

Declares a function with a result value.

Function Answer() As Integer

IF

Program flow

Begins a conditional block.

If score > 10 Then

IMPLEMENTS

Objects

Indicates which interface a class implements.

Class Counter Implements ICounter

IMPORTS

Input & projects

Loads another BASIC source file into the project.

Imports "COUNTER.BAS"

IN

Program flow

Indicates the container to be traversed.

For Each item In items

INHERITS

Objects

Indicates the base class of a class.

Class Child Inherits Parent

INPUT

Input & projects

Requests input and stores the answer in a variable.

Input "Naam"; name

INTEGER

Declarations & types

32-bit signed integer.

Dim value As Integer = 42

INTERFACE

Objects

Defines a contract for implementing classes.

Interface ICounter

IS

Operators

Compares object identity or used with TypeOf and Case.

If a Is b Then

ISNOT

Operators

Tests if object references are not the same, or if a type does not match.

If a IsNot Nothing Then

LET

Declarations & types

Optional keyword for an assignment.

Let count = 3

LONG

Declarations & types

32-bit signed integer, just like Integer.

Dim value As Long = 100000

LOOP

Program flow

Exit a Do loop, possibly with a condition.

Loop Until done

ME

Objects

Refers to the current object.

Me.count = 1

MOD

Operators

Remainder of an integer division.

Print 10 Mod 3

MYBASE

Objects

Approximates the implementation of the base class.

Return MyBase.Value()

NEW

Objects

Creates an object; Sub New defines a constructor.

Dim form As New Window("Hallo", 320, 200)

NEXT

Program flow

Exit a For loop.

Next

NOT

Operators

Inverts a logical value.

If Not ready Then

NOTHING

Objects

Empty object reference.

If value Is Nothing Then

OBJECT

Declarations & types

General type for an object reference.

Dim value As Object

OR

Operators

Logical OR; at least one condition must be true.

If ready Or enabled Then

OVERRIDABLE

Objects

Makes a method overridable in a derived class.

Public Overridable Function Value() As Integer

OVERRIDES

Objects

Overrides an overridable method of the base class.

Public Overrides Function Value() As Integer

PRESERVE

Declarations & types

Saves existing array values at ReDim.

ReDim Preserve values(20)

PRINT

Input & projects

Writes values ​​to the output window.

Print "Hallo Atari"

PRIVATE

Objects

Restricts a member to its own class.

Private count As Integer

PROTECTED

Objects

Makes a member accessible within the class and derived classes.

Protected count As Integer

PUBLIC

Objects

Makes a member accessible outside the class.

Public count As Integer

REDIM

Declarations & types

Resizes a dynamic, one-dimensional array.

ReDim values(10)

REM

Input & projects

Starts a comment line; an apostrophe is also possible.

Rem Dit is commentaar

REMOVEHANDLER

Events

Removes a previously added event connection.

RemoveHandler button.Click, AddressOf OnClick

RETURN

Program flow

Returns from a procedure, with a value at a function.

Return 42

SELECT

Program flow

Starts a selection on a value.

Select Case choice

SINGLE

Declarations & types

Numerical type for decimal numbers.

Dim value As Single = 1.5

STEP

Program flow

Sets the step size of a For loop.

For i = 10 To 1 Step -1

STOP

Program flow

Suspends execution for the debugger.

Stop

STRING

Declarations & types

Text; current maximum string length is 127 characters.

Dim name As String = "Atari"

SUB

Declarations & types

Declares a procedure with no result value.

Sub Greet()

THEN

Program flow

Close the condition of If or ElseIf.

If ready Then

THROW

Error handling

Throws an error with its own String message.

Throw "Er ging iets mis"

TO

Program flow

Indicates the end value of a For loop.

For i = 1 To 10

TRUE

Operators

The logical value true.

ready = True

TRY

Error handling

Starts a block in which runtime errors can be caught.

Try

TYPEOF

Objects

Together with Is or IsNot, checks the type of a value.

If TypeOf value Is Counter Then

UNTIL

Program flow

Repeats until the condition is true.

Do Until done

VARIANT

Declarations & types

Variable that can contain values ​​of different supported types.

Dim value As Variant

WEND

Program flow

Exit a While loop.

Wend

WHILE

Program flow

Repeats as long as the condition is true.

While count < 10

XOR

Operators

Logical exclusive OR.

Print True Xor False

And the rest of the language?

The names below are built-in functions and classes, not reserved keywords. The manuals describe their parameters and behavior.

Arithmetic & convert

Abs, Sgn, Sqr, Sin, Cos, Tan, Atn, Exp, Log, CInt, CLng, CSng, CDbl, Int, Fix and Val. CInt and CLng round half values ​​to the nearest even integer.

/ divides with decimals; \ does integer division; ^ raises to a power.

Text & containers

CStr, Len, Left, Right, Mid, UCase and LCase. LBound and UBound provide array boundaries. Arrays are one-dimensional; dynamic arrays can grow with ReDim.

GEM & MIDI

Window, Button, Label, TextBox, CheckBox, RadioButton (also OptionButton), ListBox, ComboBox, Application, MessageBox, MsgBox and Midi.

Read the full manuals →

What do you think?

Tell us what you make, ask a question or share your experience with the development environments.

The count starts with this update; previous downloads are unknown. ZIP packages and ST images count, not unique individuals.

Your name and comment will be visible on the homepage and the associated project site. No email address required. You can delete it via this browser on the site where you post the comment.

Loading comments…