There are four types of basic statements:

  1. dBL commands: These commands make up a significant portion of the entries in the dBL Language Reference. For example:

clear // Clears the Command window

erase TEMP.TXT // Erases a file on the disk

build from FISHBASE // Creates an executable

? time( ) // Displays the current time

  1. Assignment statements: A statement may include only one assignment operator, although the value assigned may be a very complex expression. For example:

clear = 14 // Assign 14 to variable named clear

f = new Form( ) // NEW and call operator on class name Form, assigned to variable f

Note that the first example uses the word "clear", but because the syntax of the statement a variable is created instead of executing the command. While creating variables with the same name as a command keyword is allowed, it is strongly discouraged.

  1. dBL expressions: An expression is a valid statement. If the expression evaluates to a number, it is equivalent to a GO command. For example:

6 // Goto record 6

3 + 4 // Goto record 7

date( ) // Get today's date and throw it away

f.open( ) // Call object f's open( ) method

  1. Embedded SQL statements: dBASE Plus features native support for SQL statements. You may type an SQL statement in the Command window, or include them in programs. If the command results in an answer table, that table is opened in the current work area. For example:

select * from FISH // Open FISH table in current work area