Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Statements Definition
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Statements
■ A statement is a syntactically complete unit of code that expresses one
specific kind of action, declaration, or definition.
■ In Visual Basic, usually only one statement per line is allowed. However,
you can use a colon (:) to combine statements. See: ◄Program Line►
■ A statement can be either executable or nonexecutable:
Type Description
══════════════ ════════════════════════════════════════════════════
Executable A statement that Visual Basic translates into a
specific action at run time.
Nonexecutable A statement that defines or declares but does not
affect the logic of the program; for example, an
assignment statement is a nonexecutable statement.
■ All Visual Basic statements are executable except:
COMMON CONST
DATA DECLARE
DEFtype DIM (for static arrays)
LET Metacommands
OPTION BASE OPTION EXPLICIT
REM SHARED
STATIC TYPE...END TYPE
■ An "assignment statement" assigns a value to a variable or property
reference. For example:
Text1.Text = "Your name"
assigns the expression "Your name" to the Text property for a text box
control.
■ When you use an assignment statement, both sides of the statement must be
either string or numeric values. For example:
Lastname$ = "Edmark"
See: ◄LET Statement►
■ A statement can also be described as "current." The current statement is
the next line to be executed during debugging.