This general overview includes information on these topics:
Attribute count expression An attribute count expression (ac expression) is any numeric constant or any arithmetic, logical, or string expression that evaluates to a valid numeric value, used to reference an attribute count within statements, functions, and arrays or string variable.
Arithmetic expressions Arithmetic expressions perform mathematical calculations on any set of operand expressions.
Arithmetic operators Arithmetic operators add, subtract, multiply, and divide numeric operands in arithmetic expressions.
Array references Dimensioned and Dynamic arrays can be referenced in BASIC programs.
Array variable An array variable references a dynamic or dimensioned array.
Arrays and relational expressions Individual elements of dimensioned and dynamic arrays are compared in relational expressions using the standard syntax.
Assignment Assignment is the process of assigning the value of an expression to a variable.
Boolean evaluation Traditionally, the result of a logical or Boolean expression is considered true if it evaluates to 1 and false if it evaluates to 0.
Compile stamps Compile stamp items contain descriptive internal information about programs compiled for BASIC.
Conversion expression A conversion expression is any function that evaluates to a valid processing code (conversion).
Data representation Data representation refers to the data types employed in BASIC. There are primarily two types of data:
Default File Variables The statements below make use of a feature known as default file variables:
Error condition An error condition is the process state that occurs when a program encounters a condition that cannot be resolved, forcing an abort to the FlashBASIC or BASIC debugger. For example, if a reference is made to a dimensioned array subscript less than 1 or greater than the number defined in the dim statement a nonrecoverable error occurs.
File variable A file variable is the symbolic way to access a file after being previously opened in a BASIC program. File variables are assigned with the open statement.
Format strings Numeric and nonnumeric strings can be formatted using format strings, which consist of numeric masks and format masks. The numeric mask code controls justification, precision, scaling, and credit indication. The format mask code controls field length and fill characters.
Functions Functions are elements in BASIC language expressions, returning a single value in place, as a function of the arguments. A function can be used anywhere a variable or expression is used.
Global Common Global common is a named BASIC variable space used to store variables and arrays in the identified area that is only initialized at logon.
ID expression An ID expression is a string expression that evaluates to an item-ID, for use in all types of read and write statements.
Logical expressions Logical expressions (also called Boolean expressions) are the result of applying logical (Boolean) operators to relational or arithmetic expressions. The result of an operation has two possible states: true or false. Logical expressions are considered false when equal to 0, and are considered true when nonzero.
Masking Masking is the process of formatting expressions using numeric masks and format masks.
Named common A named common is a global, common, BASIC variable space used to store variables and arrays in the area identified by ID. Named common space is initialized only at logon and released at logoff.
Nonfatal error condition A nonfatal error condition is a type of error that occurs when a BASIC program encounters a condition that is resolved by the BASIC run-time package, although not to the specific need of the program line of code.
Nuclear tokens Any function or expression can itself be an argument of another function or expression. The compiler evaluates expressions starting with the innermost set of parentheses.
Null evaluation Represents an empty string or decimal zero value depending on the context, string, or arithmetic operation.
Numeric expressions A numeric expression is any expression that evaluates to a number.
Operators Operators are reserved characters (and combinations of adjacent characters) and can be referenced individually by their respective symbol.
Precedence Precedence is the set of rules imposed upon the evaluation of components of an expression that are not otherwise overridden by the presence of parentheses.
Relational expressions A relational expression evaluates to 1 if the relation is true, and evaluates to 0 if the relation is false. Relational operators have lower precedence than all arithmetic and string operators. Therefore, relational operators are only evaluated after all arithmetic and string operations have been evaluated.
Relational operators Relational operators are used to compare both strings and/or numerics.
Reserved characters Reserved characters are the characters that are reserved for special purposes.
Retrieval locks If a BASIC program is run by a user that does not have retrieval or update privileges (for a file that does and is opened in the program), and then attempts to read and/or write to that file, the program terminates with an error message. In order to read or write to such a file, users must make sure that the retrieval and update lock codes match those of the file that is opened. This is a system function and cannot be accomplished from BASIC. If the file is retrieval protected, the file cannot be opened and the program is terminated with an error message.
Subvalue count expressions A subvalue count expression (sc expression) is an expression that evaluates to a valid subvalue count.
statement blocks A statement block is one or more statements that follow a BASIC decision-path related token such as, but not limited to, then, else, locked, and onerr.
statement labels statement labels are used as the destination of a goto or gosub statement.
Statements and functions This topic describes the differences between statements and functions in BASIC and provides working definitions of variables, constants, labels, spaces, and program formatting.
String expressions A string expression is any expression that evaluates to, or can be converted to a string of characters.
Substrings A substring is a set of characters that makes up part of a whole string. The syntax to specify a substring is:
Substring expressions A substring expression extracts or assigns substrings by using the [ and ] characters.
Symbol table (BASIC) When a BASIC program is compiled, a symbol table is generated, unless the s (suppress table) option has been used with the compile or basic. The symbol table is used by the BASIC debugger to reference symbolic variables.
then/else statement blocks then/else statement blocks are found in conjunction with conditional statements.
Value count expression A value count (vc) expression is an expression that evaluates to a valid value count.
Variables Variables store numbers, strings, file descriptors, or select lists and can change dynamically throughout the execution of the program.