|
Assignment statement |
Format:
var_name = value
Syntax:
Remarks:
1. if var_name was never declared before assigment statement automatically
declares it.
2. SBasic always performs semantic declaration checks.
E.g. if (value) is a variable that has been never declared before
you will be warned on the compilation time about the variable that
is trying to be used but was not referenced yet.
2. If test_expression matches an expression_list clause in more than one Case
clause, only the statements following the first match are executed.
See also:
- Dim: Used to declare and allocate storage space for variables and arrays.
Example:
i = 1 'variable i is assigned the integer const value 1. s = "hi" 'variable s is assigned the string const value "hi". a = 2+2*2 'variable a is assigned the expression b = (2+2)*8 'variable b is assigned the expression c[1] = (a+b)*(i+1) 'array item a is assigned the expression
Copyright (c) 2000-2006 by Smartphoneware. All rights reserved.