<< Click to Display Table of Contents >> Home mIoTa BASIC > mIoTa BASIC Language Reference > Lexical Elements > Tokens > Separators |
The mIoTa BASIC separators are:
•[ ] – Brackets
•( ) – Parentheses
•, – Comma
•; – Semicolon
Brackets [ ] indicate indicate an index position within a String variable or a Bit Position within a numerical variable.
mystring = 'Hello'; // So, mystring[1] is equal to 'H', mystring[2] is equal to 'e', etc.
mybyte = %00000010 // So, mybyte[1] is equal to 0, mybyte[2] is equal to 1, etc. |
For more information, refer to Strings.
Parentheses ( ) are used to group expressions, isolate conditional expressions and indicate function calls and function declarations:
d = c * (a + b); // Override normal precedence if (d = z) or (a = b) then ... // Useful with conditional statements |
For more information, refer to Operators Precedence and Associativity, Expressions and Functions and Procedures.
Comma (,) separates the arguments in function calls:
mystring = UIntToStrLZ(temp1, 7, 4); |
Semicolon (;) is a statement terminator. Every statement in mIoTa BASIC must be terminated with a semicolon