mirror of
https://github.com/QB64Official/qb64.git
synced 2024-09-16 03:54:01 +00:00
b586eafd3b
LINE INPUT will now use the faster method if passed a file handle that has been opened FOR BINARY. As such, the _BLINEINPUT command has been removed. qb64.bas now takes advantage of this for reading from '$include files, at least in Include Manager 1. Some tweaking of internal/source/main.txt was required to get things into a sane state, so I'm holing off changing the compiler any further so the auto-builder can make sure everything's smoothed over. Note: Everything should still compile as normal; I'm just being overcautious.
31 lines
No EOL
1.5 KiB
Text
31 lines
No EOL
1.5 KiB
Text
'''COMMON''' shares common variable values with other Linked or [[CHAIN]]ed modules.
|
|
|
|
|
|
::::::''Syntax:'' COMMON [SHARED] [/blockname/] variablelist
|
|
|
|
|
|
* COMMON must be called before any executable statements.
|
|
|
|
* [[SHARED]] makes the variables shared within [[SUB]] and [[FUNCTION]] procedures within that module.
|
|
|
|
* /blockname/ gives the ability to name a block of variables (ex. COMMON /thename/ a, b, c), this name can later be referenced in the module to only give access to those variables. As such, many COMMON statements can be issued with different names to be shared in different modules.
|
|
|
|
* Variablelist is the list of common variables made available separated by commas.
|
|
|
|
* Remember to keep the variable type ''order'' the same in all modules, as the variables names don't matter.
|
|
|
|
* [[COMMON SHARED]] is most commonly used to share the variables with subs and functions of that module.
|
|
|
|
* In Qbasic, Common variables can only be passed by [[CHAIN]] using compiled modules if BRUN45.EXE is included with the program.
|
|
|
|
* Linked files are compiled first and linked with LINK.EXE in QB. '''QB64''' cannot link files presently!
|
|
* '''Note: Values assigned to shared variables used as procedure call parameters will not be passed to other procedures! The shared variable value MUST be assigned INSIDE of the [[SUB]] or [[FUNCTION]] procedure to be passed!'''
|
|
|
|
|
|
''See also:''
|
|
* [[COMMON SHARED]], [[CHAIN]]
|
|
* [[DIM]], [[REDIM]], [[SHARED]]
|
|
* [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]]
|
|
|
|
|
|
{{PageNavigation}} |