Parenthesis - mkilgore/QB64pe GitHub Wiki
Parenthesis are used to enclose SUB and FUNCTION parameters or to set the operation order in Mathematical Operations.
Usage: COLOR 14: PRINT TAB(30); "Hello World"
<span style="color:yellow;">Hello World</span> |
- SUB parameters MUST be enclosed in parenthesis when the CALL statement is used. Do not use parenthesis without CALL.
- Parenthesis can be used in calculations to determine the order in which math operations are performed when the normal order would not work correctly. Normal operation order is: 1) exponential, 2) multiplication or division 3) addition or subtraction.
- Parenthesis can also denote the array index or the dimension size(s) in a DIM statement.
- Instead of BYVAL, use extra parenthesis around sub-procedure call parameters to pass them by value instead of by reference.
- Extra pairs of brackets have no effect on the code! If one is missing the IDE should tell you.
PRINT nmb$ '' '' |
See also:
Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page