1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 15:35:53 +00:00
QB64-PE/internal/help/Parenthesis.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

34 lines
1.4 KiB
Plaintext

'''Parenthesis''' are used to enclose [[SUB]] and [[FUNCTION]] parameters or to set the operation order in [[Mathematical Operations]].
''Usage:'' COLOR 14: PRINT [[TAB]](30); &quot;Hello World&quot;
{{OutputStart}}
{{text|Hello World|yellow}}
{{OutputEnd}}
* [[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.
''Example:'' Using too many brackets does not harm the code execution as long as they are paired up.
{{CodeStart}} '' ''
nmb$ = {{Cl|STR$}}(100)
nmb$ = {{Cl|LTRIM$}}((({{Cl|RTRIM$}}(nmb$)))) 'extra bracket pairs do not affect the code
{{Cl|PRINT}} nmb$ '' ''
{{CodeEnd}}
''See also:''
* [[DIM]], [[DECLARE]]
* [[SUB]], [[FUNCTION]]
* [[Arrays]]
{{PageNavigation}}