| statement labels | Index Level | STATUS |
| Syntax | |
| Category | BASIC |
| Type | Definition |
| Description |
differences between statements and functions in FlashBASIC, a working definition of variable, constant, labels, blanks, and program formatting.
If the syntax requires that the instruction be followed by a set of parentheses (optionally containing an argument or arguments), then it is a function. For example, the following are functions: "abs(num.expression)", "rnd(num.expression)" and "iconv(string.expression, conv.expression)". Any instruction that does not have to be followed by a set of parentheses is most often a statement. For example: "print x", "input y", "execute sentence". There is at least one peculiar exception to the above rule. One variant of the "locate" statement is considered a statement, even though its syntax looks like it should be a function. Another feature of statements is that they tend to "stand alone". For instance: "execute sentence" or "print array<10,1>". Functions, by contrast, do not stand alone. They are either used as part of an expression within a statement: "raise = rnd(20)", or output immediately: "crt int(amount)", "print abs(balance)". A FlashBASIC program is composed of statements made up of FlashBASIC commands, variables, constants, expressions, and functions. FlashBASIC statements may contain arithmetic, relational, and logical expressions. These expressions are formed by combining specific operators with variables, constants, or FlashBASIC intrinsic functions. The value of a variable may change dynamically throughout the execution of a program. A constant, as its name implies, has the same value throughout the execution of a program. An intrinsic function performs a pre-defined operation on the supplied parameter(s). Normally, within a FlashBASIC program, each physical line contains only one statement. This is done for ease of reading and tracking of logic. More than one statement may be placed on a program line by separating each statement with a ";" (semicolon). Statements which end with "then" or "else" on a line create a block or multi-line structure. See the "if" statement for details on "then...else" statements. Labels may be placed at the beginning of any FlashBASIC statement. A statement label may be numeric or alphanumeric. See "statement labels". Blank spaces appearing in the program line which are not part of a literal are ignored. Blank spaces and blank lines may be used freely within the program for purposes of appearance. (D3 only -- R83 does not support blank source lines). |
| Options | |
| See Also | string.expression num.expression COS ASSIGNED CASE CLEAR COL1() COL2() CONVERT CRT DEBUG DELETE DIM ECHO ENTER EXECUTE INCLUDE INDEX INPUTTRAP ... GOSUB INPUTTRAP ... GOTO LET LN MATREAD MATWRITE MOD NOT OCCURS PAGE PRECISION PROCREAD PWR READ READT READTL READTX READV REM SEQ SIN SLEEP SORT SOUNDEX SPACE STR THEN WRITE TIME CAPTURING reserved words c function COUNT CLOSE ON ... GOSUB ON ... GOTO ABORT REPLACE RELEASE TCLREAD STOP CASING PRINT EQUATE CFUNCTION ABS BREAK INT NULL TAN READNEXT SQRT ROOT NUM CALL ALPHA CHAIN statement labels OPEN TCL SUBROUTINE conv.expression WEOF ELSE OCONV WRITET PROMPT ICONV WRITEV NEXT XTD PROCWRITE @ function LOOP CLEARFILE IF INPUTERR TIMEDATE REM EXIT REPLACE LOCK EBCDIC REWIND functions TRIM nuclear tokens INPUTNULL SELECT UNLOCK PRINT ON RND CHAR PRINTER WRITEVU FIELD LEN FOR ... NEXT MAT PROGRAM SYSTEM FOOTING INSERT GET FOLD LOCATE COMMON EXTRACT IN HEADING ERROR INPUT ASCII ACCESS DELETE FILE $CHAIN AUX SPOOLQ SCAN HUSH SPOOLER CONVERT @AM @FM @VM @SM FMT SENTENCE SWAP FILELOCK FILEUNLOCK IFR |
| Example | |
| Warnings | |
| Compatibility | D3 7.0 AP R83 |
| statement labels | Index Level | STATUS |