| title | Statements |
|---|---|
| parent | Reference Section |
| nav_order | 2 |
| has_toc | false |
| permalink | /Reference/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.
-
Alias -- (twinBASIC) declares an alternative name for an intrinsic type, user-defined type, or interface
-
Call -- transfer control to a procedure
-
Class -- define a class
-
CoClass -- (twinBASIC) defines a creatable COM class as the contract for one or more Interface blocks
-
Close -- concludes input/output (I/O) to a file opened using the Open statement
-
Const -- declares constants for use in place of literal values
-
Continue -- immediately begins the next iteration of the enclosing loop
-
Declare -- declares references to external procedures in a dynamic-link library (DLL)
-
Delegate -- (twinBASIC) declares a function-pointer type --- a named signature for indirect calls
-
Dim -- declares variables and allocates storage space
-
Do ... Loop -- repeats a block of statements while a condition is True or until a condition becomes True
-
End -- ends a procedure or block
-
Enum -- declares a type for an enumeration
-
Erase -- reinitializes the elements of fixed-size arrays, or releases dynamic-array storage space
-
Error -- simulates the occurrence of an error
-
Event -- declares a user-defined event
-
Exit -- exits a block of Do…Loop, For…Next, Function, Sub, or Property code
-
For ... Next -- repeats a group of statements while the loop counter approaches its final value
-
For Each...Next -- repeats a group of statements for each element in an array or collection
-
Function -- declares the name, arguments, and code that form the body of a Function procedure
-
Get -- reads data from an open disk file into a variable
-
GoSub ... Return -- branches to and returns from a subroutine within a procedure
-
GoTo -- branches unconditionally to a specified line within a procedure
-
Handles -- (twinBASIC) binds a procedure as an event handler for one or more named events
-
If ... Then ... Else -- conditionally executes a group of statements, depending on the value of an expression
-
Input # -- reads data from an open sequential file and assigns it to variables
-
Implements -- specifies an interface or class that will be implemented in the class in which it appears
-
Interface -- (twinBASIC) defines a COM interface using twinBASIC syntax
-
Kill -- deletes files from a disk
-
Let -- assigns the value of an expression to a variable or property
-
Line Input # -- reads a single line from an open sequential file into a string variable
-
Load -- loads an object (typically a form) into memory without showing it
-
Lock, Unlock -- control access by other processes to all or part of an open file
-
LSet -- left-aligns a string within a string variable, or copies one user-defined-type variable into another
-
Mid = -- replaces a specified number of characters within a string variable
-
MidB = -- byte-positioned form of Mid =
-
Module -- defines a module: a non-instantiable container for procedures, constants, types, and module-level variables
-
Name -- renames a disk file, directory, or folder
-
New -- creates a new instance of a class
-
On Error -- enables an error-handling routine and specifies its location, or disables error handling
-
On ... GoTo, On ... GoSub -- branch to one of several lines based on the value of an expression
-
Open -- enables input/output (I/O) to a file
-
Option -- configure a compiler option
-
ParamArray -- declares the final parameter of a procedure as an arbitrary-arity list of arguments
-
Print # -- writes display-formatted data to a sequential file
-
Private -- declares module-level variables accessible only within the declaring module
-
Property -- declares the Get, Let, or Set procedures that form the body of a property
-
Protected -- (twinBASIC) declares a class member accessible within the class and its derived classes
-
Public -- declares module-level variables accessible to all procedures in all modules
-
Put -- writes data from a variable to a disk file
-
RaiseEvent -- fires an event declared at the module level within a class, form, or document
-
Randomize -- initializes the random-number generator
-
ReDim -- reallocates storage space for a dynamic array
-
Resume -- resumes execution after an error-handling routine is finished
-
Return -- returns from a GoSub subroutine, or (twinBASIC) exits a procedure with an optional value
-
RSet -- right-aligns a string within a string variable
-
SavePicture -- saves a graphic from a Picture or Image to a file
-
Seek -- sets the read/write position within a file opened by using the Open statement
-
Select Case -- executes one of several groups of statements, depending on the value of an expression
-
Set -- assigns an object reference to a variable or property
-
Static -- declares procedure-local variables whose values are preserved between calls
-
Stop -- suspends execution
-
Sub -- declares the name, arguments, and code that form the body of a Sub procedure
-
Type -- defines a user-defined data type containing one or more elements
-
Unload -- removes an object (typically a form) from memory
-
While ... Wend -- executes a series of statements as long as a given condition is True
-
With -- executes a series of statements on a single object or a user-defined type
-
Write # -- writes raw, delimited data to a sequential file (paired with Input #)
-
#If ... Then ... Else, #Const -- compiler directives that conditionally include code blocks at compile time
- DefBool through DefVar -- set the default data type for variables whose names start with given letters; superseded by explicit As type declarations