Statements

Describe

Declaration statements

Describe

For more information, see Declared Element Characteristics.

Initial values

Describe

Executable statements

Describe

Assignment statements

Describe

Eligible elements

Describe

Data types and conversions

Describe

Compound assignment

Describe

Chaining assignments

Describe

Splitting a statement over multiple lines

Most statements easily fit onto a single line of code, but when one does not, you can split it over multiple lines using the line continuation sequence. This consists of an underscore character (_) and a line break (commonly a carriage return and/or a linefeed). Although not required, you are encouraged to place a space before the underscore character to help it stand out.

In the following example, a name and address retrieved from a database table are printed to a label.

#addressLabel? #row Name? & $N & _
	#row Address?

Implicit line continuation

In some cases, you can continue a statement on another line without using the underscore character (_). The following table lists the elements of a statement and conditions in which a line break is ignored by the compiler.

ElementExample
After a comma (,)
Method ChangePassword(user_id As String,
        old_password As String,
        new_password As String) As Boolean
    ' ...
End Method
After a left parenthesis (()
Abstract Method Read_in_list <Type> (
    ByRef List<Type> #user_data )
After a left curly brace ({) or between two right curly braces (})
Dim numbers() As Integer = {
    { 1, 2, 3, 4, 5 },
    { 6, 7, 8, 9, 10 }
}

For information about using comments after a line continuation sequence, see the section below.

Adding comments

Describe

comments and line continuation

Describe

See also