Revision history for KeyPgCommon


Revision [23682]

Last edited on 2019-10-04 15:01:38 by fxm ['Common' does not work with dynamic libraries (DLL)]
Additions:
Declares a variable which is shared between code modules, including those compiled as static libraries, but not those compiled as dynamic libraries (DLLs). A matching ##**Common**## statement must appear in all other code modules using the variable.
Deletions:
Declares a variable which is shared between code modules. A matching ##**Common**## statement must appear in all other code modules using the variable.


Revision [22686]

Edited on 2019-05-23 01:57:49 by fxm [Added compilation/execution command for the example]
Additions:
After compiling the two files like:
##fbc common1.bas common2.bas##
running ##common1## produces the output:
Deletions:
Output:


Revision [22645]

Edited on 2019-03-29 10:46:09 by fxm [Suppressed the type declaration that is redundant when resizing a dynamic array (in examples)]
Additions:
Redim foo(0 To 2)
Deletions:
Redim foo(0 To 2) As Double


Revision [21499]

Edited on 2016-05-28 13:39:25 by fxm [Added exclusion cases for Common variables]
Additions:
##**Common**## variables cannot be initialized.
##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim|Dim]]## or ##[[KeyPgRedim|Redim]]## statement.
##**Common**## variables cannot be instances of a user-defined type having a constructor or a destructor even implicit.
The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub|sub]]##s and ##[[KeyPgFunction|function]]##s, as well as at module level.
Deletions:
The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub|sub]]##s and ##[[KeyPgFunction|function]]##s, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim|Dim]]## or ##[[KeyPgRedim|Redim]]## statement.


Revision [20851]

Edited on 2016-03-12 15:51:17 by fxm [Formatting]
Additions:


Revision [20094]

Edited on 2016-02-10 15:55:46 by DkLwikki [Update link format]
Additions:
**Common** [[[KeyPgShared|Shared]]] //symbolname//[()] [AS [[DataType|DataType]]] [, ...]
The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub|sub]]##s and ##[[KeyPgFunction|function]]##s, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim|Dim]]## or ##[[KeyPgRedim|Redim]]## statement.
- ##[[KeyPgDim|Dim]]##
- ##[[KeyPgErase|Erase]]##
- ##[[KeyPgExtern|Extern]]##
- ##[[KeyPgLbound|Lbound]]##
- ##[[KeyPgRedim|Redim]]##
- ##[[KeyPgPreserve|Preserve]]##
- ##[[KeyPgShared|Shared]]##
- ##[[KeyPgStatic|Static]]##
- ##[[KeyPgUbound|Ubound]]##
- ##[[KeyPgVar|Var]]##
Deletions:
**Common** [[[KeyPgShared Shared]]] //symbolname//[()] [AS [[DataType DataType]]] [, ...]
The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub sub]]##s and ##[[KeyPgFunction function]]##s, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## statement.
- ##[[KeyPgDim Dim]]##
- ##[[KeyPgErase Erase]]##
- ##[[KeyPgExtern Extern]]##
- ##[[KeyPgLbound Lbound]]##
- ##[[KeyPgRedim Redim]]##
- ##[[KeyPgPreserve Preserve]]##
- ##[[KeyPgShared Shared]]##
- ##[[KeyPgStatic Static]]##
- ##[[KeyPgUbound Ubound]]##
- ##[[KeyPgVar Var]]##


Revision [14125]

Edited on 2009-03-13 05:43:47 by CountingPine [Minor formatting fix]
Additions:
The ##**Shared**## optional parameter makes the variable global so that it can be used inside ##[[KeyPgSub sub]]##s and ##[[KeyPgFunction function]]##s, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list ##()##, and its dimensions set in a later ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## statement.
- ##//blockname//## is not needed and must be removed because the order of declaration no longer matters, only the symbol names.
Deletions:
The ##**Shared**## optional parameter makes the variable global so that it can be used inside sub's and functions, as well as at module level. ##**Common**## arrays are always variable-length, and must be defined with an empty parameter list (), and its dimensions set in a later ##[[KeyPgDim Dim]]## or ##[[KeyPgRedim Redim]]## statement.
- ##/blockname/## is not needed and must be removed because the order of declaration no longer matters, only the symbol names.


Revision [11472]

The oldest known version of this page was created on 2007-11-09 16:37:02 by JeffMarshall [Minor formatting fix]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode