# Statements

These statements are built into the language itself. They are understood by the compiler, and are not explicitly declared nor defined in the visible runtime library.

## Alphabetical List

* [Alias](/tB/Core/Alias.md) -- (twinBASIC) declares an alternative name for an intrinsic type, user-defined type, or interface

* [Call](/tB/Core/Call.md) -- transfer control to a procedure

* [Class](/tB/Core/Class.md) -- define a class

* [CoClass](/tB/Core/CoClass.md) -- (twinBASIC) defines a creatable COM class as the contract for one or more **Interface** blocks

* [Close](/tB/Core/Close.md) -- concludes input/output (I/O) to a file opened using the **Open** statement

* [Const](/tB/Core/Const.md) -- declares constants for use in place of literal values

* [Continue](/tB/Core/Continue.md) -- immediately begins the next iteration of the enclosing loop

* [Declare](/tB/Core/Declare.md) -- declares references to external procedures in a dynamic-link library (DLL)

* [Delegate](/tB/Core/Delegate.md) -- (twinBASIC) declares a function-pointer type --- a named signature for indirect calls

* [Dim](/tB/Core/Dim.md) -- declares variables and allocates storage space

* [Do ... Loop](/tB/Core/Do-Loop.md) -- repeats a block of statements while a condition is **True** or until a condition becomes **True**

* [End](/tB/Core/End.md) -- ends a procedure or block

* [Enum](/tB/Core/Enum.md) -- declares a type for an enumeration

* [Erase](/tB/Core/Erase.md) -- reinitializes the elements of fixed-size arrays, or releases dynamic-array storage space

* [Error](/tB/Core/Error.md) -- simulates the occurrence of an error

* [Event](/tB/Core/Event.md) -- declares a user-defined event

* [Exit](/tB/Core/Exit.md) -- exits a block of **Do…Loop**, **For…Next**, **Function**, **Sub**, or **Property** code

* [For ... Next](/tB/Core/For-Next.md) -- repeats a group of statements while the loop counter approaches its final value

* [For Each...Next](/tB/Core/For-Each-Next.md) -- repeats a group of statements for each element in an array or collection

* [Friend](/tB/Core/Friend.md) -- makes a member of a class available to the whole project, and keeps it out of the class's public interface

* [Function](/tB/Core/Function.md) -- declares the name, arguments, and code that form the body of a **Function** procedure

* [Get](/tB/Core/Get.md) -- reads data from an open disk file into a variable

* [GoSub ... Return](/tB/Core/GoSub-Return.md) -- branches to and returns from a subroutine within a procedure

* [GoTo](/tB/Core/GoTo.md) -- branches unconditionally to a specified line within a procedure

* [Handles](/tB/Core/Handles.md) -- (twinBASIC) binds a procedure as an event handler for one or more named events

* [If ... Then ... Else](/tB/Core/If-Then-Else.md) -- conditionally executes a group of statements, depending on the value of an expression

* [Input #](/tB/Core/Input.md) -- reads data from an open sequential file and assigns it to variables

* [Implements](/tB/Core/Implements.md) -- specifies an interface or class that will be implemented in the class in which it appears

* [Interface](/tB/Core/Interface.md) -- (twinBASIC) defines a COM interface using twinBASIC syntax

* [Kill](/tB/Modules/FileSystem/Kill.md) -- deletes files from a disk

* [Let](/tB/Core/Let.md) -- assigns the value of an expression to a variable or property

* [Line, Circle, PSet, Scale](/tB/Core/Graphics-Methods.md) -- the drawing syntax of these four methods, which the compiler turns into a call with a flags argument

* [Line Input #](/tB/Core/Line-Input.md) -- reads a single line from an open sequential file into a string variable

* [Load](/tB/Core/Load.md) -- loads an object (typically a form) into memory without showing it

* [Lock](/tB/Core/Lock.md), [Unlock](/tB/Core/Unlock.md) -- control access by other processes to all or part of an open file

* [LSet](/tB/Core/LSet.md) -- left-aligns a string within a string variable, or copies one user-defined-type variable into another

* [Mid =](/tB/Core/Mid-equals.md) -- replaces a specified number of characters within a string variable

* [MidB =](/tB/Core/MidB-equals.md) -- byte-positioned form of **Mid =**

* [Module](/tB/Core/Module.md) -- defines a module: a non-instantiable container for procedures, constants, types, and module-level variables

* [Name](/tB/Core/Name.md) -- renames a disk file, directory, or folder

* [New](/tB/Core/New.md) -- creates a new instance of a class

* [On Error](/tB/Core/On-Error.md) -- enables an error-handling routine and specifies its location, or disables error handling

* [On ... GoTo](/tB/Core/On-GoTo.md), [On ... GoSub](/tB/Core/On-GoSub.md) -- branch to one of several lines based on the value of an expression

* [Open](/tB/Core/Open.md) -- enables input/output (I/O) to a file

* [Option](/tB/Core/Option.md) -- configure a compiler option

* [ParamArray](/tB/Core/ParamArray.md) -- declares the final parameter of a procedure as an arbitrary-arity list of arguments

* [Print](/tB/Core/Print.md) -- writes display-formatted data to a file, the Debug Console, or a drawing surface

* [Private](/tB/Core/Private.md) -- declares module-level variables accessible only within the declaring module

* [Property](/tB/Core/Property.md) -- declares the **Get**, **Let**, or **Set** procedures that form the body of a property

* [Protected](/tB/Core/Protected.md) -- (twinBASIC) declares a class member accessible within the class and its derived classes

* [Public](/tB/Core/Public.md) -- declares module-level variables accessible to all procedures in all modules

* [Put](/tB/Core/Put.md) -- writes data from a variable to a disk file

* [RaiseEvent](/tB/Core/RaiseEvent.md) -- fires an event declared at the module level within a class, form, or document

* [Randomize](/tB/Modules/Math/Randomize.md) -- initializes the random-number generator

* [ReDim](/tB/Core/ReDim.md) -- reallocates storage space for a dynamic array

* [Resume](/tB/Core/Resume.md) -- resumes execution after an error-handling routine is finished

* [Return](/tB/Core/Return.md) -- returns from a **GoSub** subroutine, or (twinBASIC) exits a procedure with an optional value

* [RSet](/tB/Core/RSet.md) -- right-aligns a string within a string variable

* [SavePicture](/tB/Core/SavePicture.md) -- saves a graphic from a **Picture** or **Image** to a file

* [Seek](/tB/Modules/FileSystem/Seek.md) -- sets the read/write position within a file opened by using the **Open** statement

* [Select Case](/tB/Core/Select-Case.md) -- executes one of several groups of statements, depending on the value of an expression

* [Set](/tB/Core/Set.md) -- assigns an object reference to a variable or property

* [Static](/tB/Core/Static.md) -- declares procedure-local variables whose values are preserved between calls

* [Stop](/tB/Core/Stop.md) -- suspends execution

* [Sub](/tB/Core/Sub.md) -- declares the name, arguments, and code that form the body of a **Sub** procedure

* [Type](/tB/Core/Type.md) -- defines a user-defined data type containing one or more elements

* [Unload](/tB/Core/Unload.md) -- removes an object (typically a form) from memory

* [While ... Wend](/tB/Core/While-Wend.md) -- executes a series of statements as long as a given condition is **True**

* [With](/tB/Core/With.md) -- executes a series of statements on a single object or a user-defined type

* [WithEvents](/tB/Core/WithEvents.md) -- declares a field whose object raises events this module handles

* [Write #](/tB/Core/Write.md) -- writes raw, delimited data to a sequential file (paired with [**Input #**](/tB/Core/Input.md))

* [#If ... Then ... Else](/tB/Core/Topic-Preprocessor.md), [#Const](/tB/Core/Topic-Preprocessor.md) -- compiler directives that conditionally include code blocks at compile time

---

## Deprecated

* [DefBool through DefVar](/tB/Core/Deftype.md) -- set the default data type for variables whose names start with given letters; superseded by explicit **As** *type* declarations