QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

COMMON SHARED is used to pass variable values between 2 or more program modules and sub procedures within that module.

The multi-modular technique goes back to when QBasic and QuickBASIC had module size constraints. In QB64 it has been implemented so that that older code can still be compiled, though it is advisable to use single modules for a single project (not counting $INCLUDE libraries), for ease of sharing and also because the module size constraints no longer exist.


COMMON [SHARED][/block_name/]variable_list



COMMON SHARED x%, y%, user$, speed!, score&

See Also